search for: jhnedwards603

Displaying 5 results from an estimated 5 matches for "jhnedwards603".

2011 Feb 22
3
Weird error (special character) of read.table
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 1 1 4 2 2 5 3 2 6 > f$CEL_A NULL I'm not sure where the special character \ufeff comes from. Could anybody let me know what is the problem?
2010 May 13
3
How ls() only functions or anything else but functions?
Hello, How ls() only functions or only data objects (basically anything other than functions) such as data.frame, numeric ...? John [[alternative HTML version deleted]]
2011 Feb 15
2
Error when modifying names of the object returned by get()
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] names(get('x'))=LETTERS[1:10] #names(x)=LETTERS[1:10] x $ Rscript main_get_name_assign.R
2011 Mar 05
2
How to show non user defined data set such as cu.summary (from rpart)?
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 way to show not only user defined data sets but also data sets from loaded
2011 Feb 28
2
converting the string columns in a data.frame to factors?
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? > aframe1=data.frame(x=LETTERS[1:10], y=LETTERS[1:10], stringsAsFactors=F) >