[R] factor creation

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Sep 12 10:13:58 CEST 2003


On Fri, 12 Sep 2003 anne.piotet at urbanet.ch wrote:

> Another newbie question....
>   I want to create a factor (say cT)from a numerical variable (sy temp) by 
> regrouping the values in classes (say cT <390, [390,400[,[400,409[...>=550)
> 
> Is there a simple way of doing that using the factor function?

No, but see ?cut.

> AND I do not find how to manipulate strings (I want to concatenete characters 
> strings ("abkdas","chjw") into something like ("abkdas;chjw")what operators are 
> available for strings manipulation and where do I find help??

See ?paste.  This is in `An Introduction to R', and all good books on S/R
will give you more details.

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




More information about the R-help mailing list