[R] reading header in txt file and making histogram

2012-03-26 Thread bamboohydraulics
Dear all I am a BEGINNER and have R on my Mac. I saved my excel file as .txt file, I have just one column with first row as the column name. My file when read by R looks like this. After reading the table I try to make a histogram by hist(dbh), it says object dbh not found. What am I doing wrong

Re: [R] reading header in txt file and making histogram

2012-03-26 Thread bamboohydraulics
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 i