On Dec 7, 2010, at 2:31 PM, Erik Iverson wrote:
Hello,
To do what you want, see ?toupper :
levels(dat$target) <- toupper(levels(dat$target))
However, for clarity,
dat$target is not a "string variable", it is a factor,
which you can verify with
> str(dat)
And to further clarify, it is a f
Phil Spector wrote:
Jahan -
Try
dat$target = toupper(dat$target)
Note that in this case, the above *will* coerce dat$target
to a character vector, which may or may not be what
is intended.
__
R-help@r-project.org mailing list
https://stat.ethz
Jahan -
Try
dat$target = toupper(dat$target)
I would not recommend a loop for something
like this.
(You might also want to brush up on your python,
because what you're trying doesn't work in
python either.)
- Phil Spector
Hello,
To do what you want, see ?toupper :
levels(dat$target) <- toupper(levels(dat$target))
However, for clarity,
dat$target is not a "string variable", it is a factor,
which you can verify with
> str(dat)
Factors are enumerated types, and have a discrete
set of 'levels' associated with the
Hello,
Here is the data set I am working with:
dat=read.csv('http://dl.dropbox.com/u/1852742/relexpressions.csv')
names(dat)
#Under the 'target' column, I want to change all of the values into
all capital letters (e.g. fgf2 becomes FGF2). I have taken a loop
approach but I think my Python backgro
5 matches
Mail list logo