Hi, I have a simple question. I have a variable with 3 levels. Variable A A A A A A B B B B B B C C C C C C I need to make a new vector renaming de levels B and C for D. NewVariable A A A A A A D D D D D D D D D D D D I dont find how to make it in manuals or in this list. Can anyone help-me??? Thank you Ronaldo -- Agnes' Law: Almost everything in life is easier to get into than out of. -- | //|\\ [*****************************][*******************] || ( ? ? ) [Ronaldo Reis J?nior ][PentiumIII-600 ] | V [ESALQ/USP-Entomologia, CP-09 ][HD: 30 + 10 Gb ] || / l \ [13418-900 Piracicaba - SP ][RAM: 128 Mb ] | /(lin)\ [Fone: 19-429-4199 r.229 ][Video: SiS620-8Mb ] ||/(linux)\ [chrysopa at insecta.ufv.br ][Modem: Pctel-onboar] |/ (linux) \[ICQ#: 5692561 ][SO: CL 7.0 (2.2.19)] || ( x ) [*****************************][*******************] ||| _/ \_Powered by Conectiva Linux 7.0 D+:) | Lxuser#: 205366 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Fri, 21 Sep 2001, Ronaldo Reis Jr. wrote:> Hi, > > I have a simple question. > > I have a variable with 3 levels. > > Variable > A A A A A A > B B B B B B > C C C C C C > > I need to make a new vector renaming de levels B and C for D. > > NewVariable > A A A A A A > D D D D D D > D D D D D D > > I dont find how to make it in manuals or in this list.See ?levels and follow the link to ?"levels<-.factor"> old <- factor(LETTERS[1:3]) > old[1] A B C Levels: A B C> levels(new) <- c("A", "D", "D") > new[1] A D D Levels: A D You could use> factor(old, labels=c("A", "D", "D"))[1] A D D Levels: A D D but as you see, that is not precisely the same thing. -- 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 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
At 08:27 AM 21/09/2001 -0300, Ronaldo Reis Jr. wrote:>Hi, > >I have a simple question. > >I have a variable with 3 levels. > >Variable >A A A A A A >B B B B B B >C C C C C C > >I need to make a new vector renaming de levels B and C for D. > >NewVariable >A A A A A A >D D D D D D >D D D D D D > >I dont find how to make it in manuals or in this list. >Can anyone help-me??? >Thank you >Ronaldo >--Dear Ronaldo, There are several ways to do this; one way is to use the recode function in the car package: new <- recode(var, " c('B', 'C') = 'D' ") I hope that this helps, John ----------------------------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario, Canada L8S 4M4 email: jfox at mcmaster.ca phone: 905-525-9140x23604 web: www.socsci.mcmaster.ca/jfox ----------------------------------------------------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi there. Is anyone compiling a version of R for a handheld linux device eg. Agenda VR3? (See http://www.cs.umbc.edu/~acedil1/agenda/general.shtml... ) The idea of a pocketable device one could work up R syntax on (using subsets of data... during train journeys or overlong meetings...) is most appealing. Stuart Dr Stuart Leask MA MRCPsych, Clinical Lecturer in Psychiatry University of Nottingham Dept of Psychiatry, Duncan Macmillan House Porchester Road, Nottingham. NG3 6AA. UK http://www.nottingham.ac.uk/psychiatry/staff/sjl.html -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Mon, 24 Sep 2001, Stuart Leask wrote:> Hi there. Is anyone compiling a version of R for a handheld linux device eg. > Agenda VR3? (See http://www.cs.umbc.edu/~acedil1/agenda/general.shtml... ) > > The idea of a pocketable device one could work up R syntax on (using subsets > of data... during train journeys or overlong meetings...) is most appealing.it is, indeed. I am trying a port to linux on iPAQ (see http://www.handhelds.org). I already can compile it and run it, but it has some strange bugs yet. It is far from passing a "make check". One of the problems is, most of these little devices have no floating point processing unit, so we have to use fpu emualation (this holds especially for ARM based devices like the iPAQ). I believe this triggers most of the bugs (e.g. for instance I can not plot, x11() devices have strange plotting range parameters (Inf...). Unfortunataly the latest version of R triggered an internal ARM g77 compiler error in the eigen.f routine and I have no solution for it yet. Currently I am waiting for the next release of the handhelds (http://www.handhelds.org) linux distribution (debian based) to start from scratch again. I think it is also possible that my installation has a glibc version problem, because I took the basic distribution from www.handhelds.org and added development stuff from debian-arm to it. If you want to look at some first screenshots: http://www-stat.uni-klu.ac.at/~agebhard/software.phtml#r-ipaq Albrecht // Albrecht Gebhardt Tel.: (++43 463) 2700/3118 // Institut fuer Mathematik Fax : (++43 463) 2700/3198 // Universitaet Klagenfurt mailto:albrecht.gebhardt at uni-klu.ac.at // Universitaetsstr. 65 http://www-stat.uni-klu.ac.at/~agebhard // A-9020 Klagenfurt, Austria -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._