[R] Basic SPSS commands in R ?

Ben Bolker ben at zoo.ufl.edu
Sat Sep 8 17:08:40 CEST 2001


On Sat, 8 Sep 2001, C. Schulz wrote:

> Hello,
> i'm newbie of R and think it is a really good alternative to SPSS.
> But i have more problems using elementary things comparable with using advanced methods.


1. make your variable into a factor, then set the levels
(see ?factor, ?levels)

>
> (1) How can i value label i.e the variable X in data.frame DATA
> with the labels ( 1=very good ) (2=good).
>
> spss syntax when DATA is in Spreadsheet is:
> value labels X
> 1 'very good'.
> 2 'good'.
> execute.
>

2. Look at ?split, ?tapply, ?table

> (2) How can i split the data set dependent from one variable and
> give a special output i.e. frequencies.
>
> spss syntax:
> SORT CASES BY countryg .
> SPLIT FILE
> LAYERED BY countryg .
> FREQUENCIES
> VARIABLES=X Y Z
> /ORDER ANALYSIS .
>
> Thanks in advance
> regards,christian
>
> _______________________________________________________________________
>
>
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
318 Carr Hall                                bolker at zoo.ufl.edu
Zoology Department, University of Florida    http://www.zoo.ufl.edu/bolker
Box 118525                                   (ph)  352-392-5697
Gainesville, FL 32611-8525                   (fax) 352-392-3704


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list