[R] reading header in txt file and making histogram

chuck.01 CharlieTheBrown77 at gmail.com
Mon Mar 26 16:05:00 CEST 2012


You really need to read one of many beginners guides to R; but I will say
this much:

YOUR_DATA <- read.table("nigeria slr misc/Nigeria India /DBHHISTOGRAM.txt",
header=TRUE)

then you should be able to plot it like I said previously. 
If that still doesn't work, you need to read the posting guide and provide a
lot more info than you have. 
At the very least, copy and paste the results of the following

str(YOUR_DATA)





bamboohydraulics wrote
> 
> this is what I do, IT READS THE TABLE, But then I am stuck, I removed the
> header
> 
> read.table("nigeria slr misc/Nigeria India /DBHHISTOGRAM.txt",
> header=FALSE)
> hist("nigeria slr misc/Nigeria India /DBHHISTOGRAM.txt"$V1)
> Error in "nigeria slr misc/Nigeria India /DBHHISTOGRAM.txt"$V1 : 
>   $ operator is invalid for atomic vectors
> 
> or >
>  hist("nigeria slr misc/Nigeria India /DBHHISTOGRAM.txt",V1)
> Error in hist.default("nigeria slr misc/Nigeria India /DBHHISTOGRAM.txt", 
> : 
>   'x' must be numeric
> 
> or
> with("nigeria slr misc/Nigeria India /DBHHISTOGRAM.txt",hist(V1))
> Error in eval(substitute(expr), data, enclos = parent.frame()) : 
>   invalid 'envir' argument
> 


--
View this message in context: http://r.789695.n4.nabble.com/reading-header-in-txt-file-and-making-histogram-tp4504813p4505919.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list