[R] Strange R/party behaviuor in CentOS

2011-06-13 Thread jdanielnd
Hello, I'm facing a strange behaviour when I try to run predict function for a cforest model from party package in CentOS. It works OK on MacOSX and Ubuntu, but R process is killed when I try it on CentOS. I read a dataframe and generate a forest model using cforest from party package. To reduce

Re: [R] use variable value to create new variable name

2011-06-13 Thread jdanielnd
Actually it's highly discouraged to do that, since you lose control of the number of variables do you have, you spread them in different objects. It's much wiser to use a vector or a list to do that. -- View this message in context: http://r.789695.n4.nabble.com/use-variable-value-to-create-new-

[R] "Where" command in ctree (party)

2011-02-07 Thread jdanielnd
Hello, I need to classify (i.e., export a vector with terminal node id's) new cases using a ctree (party package) model based on different cases (learning sample). I tried the where command with the following syntax: > where(tree, newdata=data2) expecting to get terminal nodes of data2 cases b

[R] Ctree Model Variables

2011-03-24 Thread jdanielnd
Hello! I am not familiar to deal with S4 objects in R, so this question can be stupid, but I hope I can get an answer. :P I'm trying to extract what are the response and explanatory variables from a Binary Tree and Random Forest. I could already extract the response variable from a Binary Tree u

Re: [R] Standard deviation and Mean

2011-06-14 Thread jdanielnd
Well, it depends on what mean and sd do you want to calculate. If it's the mean of the variation or frequency mean and sd from the showed variables, you should do: > mean(variation) > sd(variation) > mean(frequency) > sd(frequency) However, if you want to calculate the mean of variation, taking i

Re: [R] Export Tree for latex

2011-11-18 Thread jdanielnd
What kind of object it is? How was it generated? It doesn't have a plot method? -- View this message in context: http://r.789695.n4.nabble.com/Export-Tree-for-latex-tp4083586p4083593.html Sent from the R help mailing list archive at Nabble.com. __ R-h

[R] Merge dataframes

2011-10-07 Thread jdanielnd
Hello, I am having some problems to use the 'merge' function. I'm not sure if I got its working right. What I want to do is: 1) Suppose I have a dataframe like: height width 11.12.3 22.12.5 31.81.9 4

Re: [R] Merge dataframes

2011-10-07 Thread jdanielnd
I'm not sure if this solves the problem. The NA cases are spread into de cases. This solution always returns the NA cases for the last variables as the last cases. It's not keeping the same row.names they have in data1. What I want to do it return exactly the same data1 (cases in the same order)

Re: [R] Merge dataframes

2011-10-08 Thread jdanielnd
Hi everybody, I got a solution for my problem with Eric Paniagua (many thanks!)! Thank you a lot everybody! Paniagua said explained that I was losing row.names when I merged a data.frame with a factor object (data2$color), because a factor objects don't have row.names. Instead of merging data1 to