Skip to content

Search Archives

Search tips
from:Name Search by author name, e.g. from:Duncan Murdoch "exact phrase" Match an exact phrase word1 word2 Match messages containing both words Date range Use the date pickers to filter results to a time period

Use the list dropdown to narrow results to a specific mailing list. Combine from: with other terms to filter by author and content.

26 results for “from:Martin Lam”

How to sort data sets?
Martin Lam · Sep 15, 2005 · r-help

Hi, I was wondering if someone know how to sort a data set by column. I've tried sort() but without luck. I would think there should be a function for it somewhere. An example with the iris data set...

How to print output during for loops?
Martin Lam · Oct 29, 2005 · r-help

Hi, I was wondering, if it is possible to print out the values of variables while you are in a for/while loop? Like this for example: for (i in 1:5) { i } So what I want is this as...

Copying rows from a matrix using a vector of indices
Martin Lam · Aug 17, 2005 · r-help

Hi, I am trying to use a vector of indices to select some rows from a matrix. But before I can do that I somehow need to convert 'combinations' into a list, since 'mode(combinations)' says it's 'numerical'. Any...

How to save R-grafics in eps format
Martin Lam · Feb 1, 2006 · r-help

Dear Claudia, This is how I save the plots as *.eps. postscript(file="testplot.eps", paper="special", width=10, height=10, horizontal=FALSE) yvalues = runif(100) plot(yvalues) dev.off() HTH, Martin Lam --- paladini at rz.uni-potsdam.de wrote...

newbie- how to add a row to a matrix
Martin Lam · Aug 17, 2005 · r-help

# row bind a <- matrix(1:5) a a <- rbind(a, 6) a # column bind b <- matrix(1:5) b b <- cbind(b, 6:12) b b <- cbind(b, 13) b Hope this helps, Martin --- Simone Gabbriellini <ogabbrie at tin.it...

How do I get the row indices?
Martin Lam · Sep 16, 2005 · r-help

Hi, I was wondering if it's possible to get the row numbers from a filtering. Here's an example: # give me the rows with sepal.length == 6.2 iris[(iris[,1]==6.2),] # output Sepal.Length Sepal.Width Petal...

How to fit all points into plot?
Martin Lam · Dec 29, 2005 · r-help

Hi, I have a problem when I want to add new points (or a new line) to the graph. Some points (or parts of the line) are not shown on the graph because they lie beyond the scale of the...

How to calculate the generalization error of random forests?
Martin Lam · Feb 9, 2006 · r-help

Hi, Perhaps this is not the proper place to ask this question but I am out of options, therefore I apologize in advance. I want to know how the (upper bound?) generalization error of the random forest is determined using...

Can R handle medium and large size data sets?
Martin Lam · Jan 24, 2006 · r-help

Dear Gueorgui, > Is it true that R generally cannot handle medium > sized data sets(a > couple of hundreds of thousands observations) and > threrefore large > date set(couple of millions of observations)? It depends on what you want to do with...

How to speed up R code?
Martin Lam · Oct 18, 2005 · r-help

Hi, I have written a piece of code, which is a variant of the random forest (rf) package algorithm, entirely in R. I know that some of the code in the rf package is written in c or c++. The...

How to force a vector to be column or row vector?
Martin Lam · Feb 2, 2006 · r-help

Hi, Perhaps you should try the transpose function t(). It converts a row into a column and vice versa. HTH, Martin Lam --- Michael <comtech.usa at gmail.com> wrote: > Hi all, > > I tended to use rbind, or cbind to force...

How to get the rowindices without using which?
Martin Lam · Sep 26, 2005 · r-help

Hi, I was wondering if it is possible to get the rowindices without using the function "which" because I don't have a restriction criteria. Here's an example of what I mean: # take 10 randomly selected instances iris[sample...

how to find indices of particular array elements
Martin Lam · Oct 17, 2005 · r-help

# create a 4x4 matrix with random values smallmatrix = matrix(runif(16)*10, ncol = 4, nrow = 4) # get the row and column number of the item in the matrix with the highest value which(smallmatrix == max(smallmatrix), arr.ind = 1) HTH...

Re-evaluating the tree in the random forest
Martin Lam · Sep 8, 2005 · r-help

Dear mailinglist members, I was wondering if there was a way to re-evaluate the instances of a tree (in the forest) again after I have manually changed a splitpoint (or split variable) of a decision node. Here's an...

How to erase objects
Martin Lam · Sep 13, 2005 · r-help

# to see the objects that are currently in memory objects() # to remove everything rm(list = ls()) HTH, Martin --- Luis Ridao Cruz <Luisr at frs.fo> wrote: > ?rm > > > >>> <v.schlecht at arcor.de> 13/09/2005 12:08:55 >>> > > Hi, I...

'mean' function
Martin Lam · Sep 30, 2005 · r-help

Type "?mean" and hit "enter" in the console to see the description of the function. # randomly draw 5 numbers between 1 and 10 without replacement randomlist = sample(1:10, 5) # calculate the mean of the list meanoflist = mean(randomlist) # show...

matrix indexing
Martin Lam · Aug 18, 2005 · r-help

x <- array(1:20, dim = c(4, 5)) ind <- array(c(1:3, 3:1), dim = c(3, 2)) # instead of using ind (pairs of coordinates) for getting the items in the matrix, you can convert it to a list...

Truncate levels to use randomForest
Martin Lam · Aug 26, 2005 · r-help

Hi, I will explain my problem with this example: library("randomForest") # load the iris plant data set dataset <- iris numberarray <- array(1:nrow(dataset), nrow(dataset), 1) # include only instances with Species = setosa or virginica indices <- t(numberarray[(dataset$Species...

How to add decision trees into a list?
Martin Lam · Aug 14, 2005 · r-help

Hi, I am somewhat new to R so this question may be foolish, but is it possible to add decision trees into a list, array or vector in R? I am trying to build a collection (ensemble) of decision trees...

problem with certain data sets when using randomForest
Martin Lam · Aug 26, 2005 · r-help

Thank you for this and earlier help Mr. Ripley. Martin --- Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote: > Look at ?"[.factor": > > finaldataset$Species <- > finaldataset$Species[,drop=TRUE] > > solves this. > > On Fri, 26 Aug 2005, Martin Lam wrote: > > > Hi...

Can't find what you're looking for? Try searching with Google .