hi my name is Tomer,im using R version 1.4 i've encontered a couple of problems with my my R programing. 1. i cant understand what is the whights in the nnet$wts command(which weight fit to the nodes). 2.my OS is Windows XP , i want to operate R from the command line and i want it to operate a file automaticly(the commands written in a text file) ,is it possible?( i know that in unix it is),How can i do it. thanks in advance. Tomer
On Wed, 25 Jun 2003, Tomer Maymon wrote:> my name is Tomer,im using R version 1.4As the current version is 1.7.1 (and there never was a 1.4), you need to upgrade.> i've encontered a couple of problems with my my R programing. > 1. i cant understand what is the whights in the nnet$wts command(which > weight fit to the nodes).I can't understand that sentence! Guessing, if you look at the summary method you will see it labels the weights. Read the code to find out how, or just use the labels.> 2.my OS is Windows XP , i want to operate R from the command line and i want > it to operate a file automaticly(the commands written in a text file) ,is it > possible?( i know that in unix it is),How can i do it.Try looking in the rw-FAQ: it is described there. Q2.10 in the current version of that FAQ. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Dear all, I have the problem, please, help me. I tried to import the dataset from the SPSS into the R. It is the panel (survey). The importing of the data show that my variables are read as afactor in R. But I need the variable "income" as a numeric one. I tried to use the following command: for(i in c("AGE99","AGE00","I99PTOT","I00PTOT","I99PTOTN","I00PTOTN","I99PTOTG","I00PTOTG")) + {df[[i]]<-as.numeric(df[[i]])} and then I get the error message. Error in "[[<-.data.frame"(*tmp*, i, value = as.numeric(df[[i]])) : replacement has 1 rows, data has 6335 What can I do? Could you please help me. I need it for my work. Dear all, I have the problem, please, help me. I tried to import the dataset from the SPSS into the R. It is the panel (survey). The importing of the data show that my variables are read as afactor in R. But I need the variable "income" as a numeric one. I tried to use the following command: for(i in c("AGE99","AGE00","I99PTOT","I00PTOT","I99PTOTN","I00PTOTN","I99PTOTG","I00PTOTG")) + {df[[i]]<-as.numeric(df[[i]])} and then I get the error message. Error in "[[<-.data.frame"(*tmp*, i, value = as.numeric(df[[i]])) : replacement has 1 rows, data has 6335 What can I do? Could you please help me. I need it for my work.
Silika Tereshchenko wrote:> Dear all, > > > > I have the problem, please, help me. I tried to import the dataset from the SPSS > into the R. It is the panel (survey). The importing of the data show that my > variables are read as afactor in R. But I need the variable "income" as a > numeric one. I tried to use the following command: > > for(i in > c("AGE99","AGE00","I99PTOT","I00PTOT","I99PTOTN","I00PTOTN","I99PTOTG","I00PTOTG")) > + {df[[i]]<-as.numeric(df[[i]])} > > and then I get the error message. > Error in "[[<-.data.frame"(*tmp*, i, value = as.numeric(df[[i]])) : > replacement has 1 rows, data has 6335 > > What can I do? Could you please help me. I need it for my work.Is df really a data.frame? Can you tell us about its structure using str(df)? What is your version of R? Your statement works for me with a simple example of df[[i]]. Uwe Ligges> Dear all, > > > > I have the problem, please, help me. I tried to import the dataset from the SPSS > into the R. It is the panel (survey). The importing of the data show that my > variables are read as afactor in R. But I need the variable "income" as a > numeric one. I tried to use the following command: > > for(i in > c("AGE99","AGE00","I99PTOT","I00PTOT","I99PTOTN","I00PTOTN","I99PTOTG","I00PTOTG")) > + {df[[i]]<-as.numeric(df[[i]])} > > and then I get the error message. > Error in "[[<-.data.frame"(*tmp*, i, value = as.numeric(df[[i]])) : > replacement has 1 rows, data has 6335 > > What can I do? Could you please help me. I need it for my work. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Seemingly Similar Threads
- factor as seq() in for loop
- Follow-up about ordinal logit with mixtures: how about 'continuation ratio' strategy?
- segfault in plot(x, y, col = aFactor) (PR#9221)
- [LLVMdev] John the Ripper in the test suite?
- [ win32utils-Patches-6335 ] pure ruby implementation