On Dec 3, 2012, at 3:34 PM, Audrey wrote:
res=names(dat);
get(res[ind],pos=dat) will retrieve dat$name
There are far less baroque was of doing that (including dat$name and
dat[["name"]].
Both dat$name and dat[["name"]] require you to know what "name" is.
I was
looking for a way to retriev
> res=names(dat);
> get(res[ind],pos=dat) will retrieve dat$name
There are far less baroque was of doing that (including dat$name and
dat[["name"]].
Both dat$name and dat[["name"]] require you to know what "name" is. I was
looking for a way to retrieve a data frame column by name without actua
On Dec 2, 2012, at 12:46 PM, Audrey wrote:
I am trying to write a function to change the case of all of the
text in a
data frame to lower case.
Define what you mean by "text".
I do not have foreknowledge of the data frame
names or the data types of each column.
It seems that if one ref
On Dec 3, 2012, at 9:47 AM, Audrey wrote:
Ok, it seems that the function to get generic field names is get()
Er, not really.
res=names(dat);
get(res[ind],pos=dat) will retrieve dat$name
There are far less baroque was of doing that (including dat$name and
dat[["name"]]. Read:
?"["
I
Ok, it seems that the function to get generic field names is get()
res=names(dat);
get(res[ind],pos=dat) will retrieve dat$name
--
View this message in context:
http://r.789695.n4.nabble.com/Change-case-of-factor-in-data-frame-tp4651696p4651919.html
Sent from the R help mailing list archive at
I am trying to write a function to change the case of all of the text in a
data frame to lower case. I do not have foreknowledge of the data frame
names or the data types of each column.
It seems that if one references the data frame by index, then it returns
class "data.frame" but if it is refe
6 matches
Mail list logo