[R] How to show non user defined data set such as cu.summary (from rpart)?

2011-03-05 Thread John Edwards
Hi All, ls() doesn't show cu.summary. ?ls says When invoked with no argument at the top level prompt, \u2018ls\u2019 shows what data sets and functions a user has defined. Therefore, the reason ls() doesn't show cu.summary is because cu.summary is from a package but not user defined. Is there a

[R] converting the string columns in a data.frame to factors?

2011-02-28 Thread John Edwards
Dear All, I'm not sure if I understand the parameter stringsAsFactors correctly. I'm trying to convert the string columns in aframe1 to factors. But it seems stringsAsFactors=T in as.data.frame() doesn't do anything. Could anybody let know what is the correct way to converting strings to factors?

[R] Weird error (special character) of read.table

2011-02-22 Thread John Edwards
Hi, I have the following input file. $ cat main.txt CEL_A CELL_B 1 4 2 5 2 6 Then I run read.table in R. f=read.table('main.txt', header=T, check.names=F, sep='\t') head(f) \ufeffCEL_A CELL_B 11 4 22 5 32 6 f$CEL_A NULL I'm not sure where the special character

Re: [R] Weird error (special character) of read.table

2011-02-22 Thread John Edwards
. Please excuse my brevity. John Edwards jhnedwards...@gmail.com wrote: Hi, I have the following input file. $ cat main.txt CEL_A CELL_B 1 4 2 5 2 6 Then I run read.table in R. f=read.table('main.txt', header=T, check.names=F, sep='\t') head(f) \ufeffCEL_A CELL_B 11 4 2

[R] Error when modifying names of the object returned by get()

2011-02-15 Thread John Edwards
I get the following error when I try to modify the names of the object returned by get(). Does anybody know how to do so? (I could use as.vector() to remove the names, but I'm interested in how to modify the object returned by get().) $ cat main_get_name_assign.R x=1:10 names(x)=letters[1:10]

[R] How ls() only functions or anything else but functions?

2010-05-13 Thread John Edwards
Hello, How ls() only functions or only data objects (basically anything other than functions) such as data.frame, numeric ...? John [[alternative HTML version deleted]] __ R-help@r-project.org mailing list