I have an ascii dataset which consists of three columns, but only the last two are actual data. Now I want to create a dotchart of the data by using read.csv(file = "result1", sep= " "). R reads all three columns. How do I avoid this?
Tell me more
×
Cross Validated is a question and answer site for
statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.
|
|
|||||
|
|
You can use the
More generally, you can use colClasses to specify the particular types of columns; |
|||
|
|
|
Another option is to read in the whole file, but keep only two of the columns, e.g.:
or, using column names, eg. if columns are named 'col1, col2, col3'
|
||||
|
|