Displaying 8 results from an estimated 8 matches similar to: "Migrating from S-Plus to R - Exporting Tables"
2008 Jul 02
1
randomForest training error
While trying to train randomForest with my dataset, I am ending up with the
following error
Error in randomForest.default(datatrain, classtrain) :
length of response must be the same as predictors
My data looks like:
A,B,C,D,Class
1,2,1,2,cl1
1,2,1,2,cl1
3,2,1,2,cl2
3,2,1,2,cl2
3,2,1,2,cl2
3,2,1,2,cl2
3,2,1,2,cl2
3,2,1,2,cl2
3,2,1,2,cl2
3,2,12,3,cl2
3,2,1,2,cl2
Actual dataset has around 4000
2008 Jul 15
3
playwith package crashes on Mac
Dear R-helpers,
I tried the playwith packages for the first time, and it crashed R:
> require(playwith)
Loading required package: playwith
Loading required package: lattice
Loading required package: grid
Loading required package: gWidgets
Loading required package: gWidgetsRGtk2
Loading required package: RGtk2
Loading required package: cairoDevice
> sessionInfo()
R version 2.7.1
2012 May 25
0
plotting sorted factors
Hello,
The problem is that the factors are not orderd by the row number. If you
want to check their order, use
str(sortdata)
and you'll see Santa-Rosa was attributed factor level 4 (in the output,
first variable, the 3rd and 4th).
Try the following.
sortdata <- read.table(text="
county year x1 x2 x3 x4 x5 x6 x7 rank
141 Escambia 2002 6.50
2012 Apr 06
1
Execution speed in randomForest
I am using the randomForest package. I have found that multiple runs
of precisely the same command can generate drastically different run
times. Can anyone with knowledge of this package provide some insight
as to why this would happen and whether there's anything I can do
about it? Here are some details of what I'm doing:
- Data: ~80,000 rows, with 10 columns (one of which is the
2010 May 09
1
Plot polygon in 3D with rgl
Dear R-helpers, an rgl-ers in particular,
what is the easiest way to plot a section of a plane in 3D, that is
given by the xyz coordinates of the outline?
Suppose I have a polygon - which I know for sure is a set of
coordinates on the same plane. One method I found is to use surf.tri
from the geometry package, and then plot the triangles with
rgl.triangles. This method is not perfect though,
2002 Jun 19
2
solve() doesn`t work
Hi,
I tried to inverse a matrix but it doesn`t work. I hope somebody can help
me. This is what I did.
> kurse <- read.table("kurse.txt", header=T, dec=",")
> x <- cbind(1,kurse[,-c(1)])
> y <- kurse$index
> t(x) %*% x
Error in t(x) %*% x : requires numeric matrix/vector arguments
> x <- as.matrix(x)
> xtxi <- solve(t(x) %*% x)
Error in
2004 Mar 29
1
StepAIC
Dear list,
here is an example of stepAIC that I do not understand.
The data is n=42, Lage is the only factor and there are four other
variables treated as continuous.
First you see the stepAIC-forward solution (fs7). The strange thing here
is that apparently not all interactions are tried for inclusion, but only
WQ:Lage. In particular, I think that WFL:Lage should be tried
in the last two
2012 Oct 15
1
performance analytics
hi Michael,
am sorry for the incomplete reply .
csv file data havinmg like this ,
>getSymbols("IBM")
>weekly_data = to.weekly(week_name)
>dataframe=data.frame(weekly_data)
>outputfile_name="F:\\R-programs\\Outputfile.csv"
>write.table(dataframe, file =outputfile_name,sep = ",",col.names
=TRUE,row.names = T)
> datafrom_table <-