Skip to content

mode(x) <- "double"

4 messages · aledanda, Dimitri Liakhovitski, Giovanni Petris

#
Hi,
I need your help!! 
I imported a big coloumn vector from a txt file but it results as mode
:"list" I want to change it in numeric otherwise I can't do my analysis.
This is what i get:

mode (data) <- "double"
Error in eval(expr, envir, enclos) : 
 (list) object cannot be coerced to type 'double'
Thanks a lot!!!

Alessandra
#
Can you give an example of your .txt file that you are reading in?
On Wed, Apr 29, 2009 at 1:38 PM, aledanda <danda.galli at gmail.com> wrote:

  
    
#
SOLVED:

I imported again the data like this:

data <- scan ("data.txt")

Thanks Phil Spector!

Alessandra
aledanda wrote:

  
    
#
How did you "import" the data? What function did you use?
Maybe unlist(data), but to get a more precise answer you have to tell
us how you read the data in R

Best,
Giovanni