[R] cbind and cbind.data.frame

2012-07-09 Thread James Long
## Hi, I'm having trouble understanding how the cbind function decides what method to apply to its arguments. Easy cut and paste code below. > > > > ## create two columns > c1 <- c("A","A","B","B") > c2 <- 1:4 > > ## cbind outputs a matrix with elements that are characters, seems reasonable

[R] POSIXlt and trunc

2012-06-14 Thread James Long
Hi, I'm having trouble understanding how trunc is operating on vectors of POSIXlt objects. Why does dates[1:4] in the last line return a bunch of NAs even though dates look like it has all the right elements? This worries me that something is off with my use of trunc. Is trunc not suppose to be ve

[R] class weights with Random Forest

2011-09-13 Thread James Long
Hi All, I am looking for a reference that explains how the randomForest function in the randomForest package uses the classwt parameter. Here: http://tolstoy.newcastle.edu.au/R/e4/help/08/05/12088.html Andy Liaw suggests not using classwt. And according to: http://r.789695.n4.nabble.com/R-help-

Re: [R] How to plot a normal distribution curve and a shaded tail with alpha?

2010-11-08 Thread James Long
Here's an example of a PDF with the tails shaded: http://stackoverflow.com/q/3494593/37751 -JD On Mon, Nov 8, 2010 at 10:18 AM, Wu Gong wrote: > > I want to create a graph to express the idea of the area under a pdf curve, > like > > http://r.789695.n4.nabble.com/file/n3032194/w7295e04.jpg > >