Category Archives: R Tip

Removing Extra Column of Data from CSVs in R — R Tip

When R writes a csv file, you get an extra column of data as such: > s > plot(x=s$x, y=s$y ) > > write.csv(x=s, file=’s0.csv’ ) When you peek in the csv file, you see this: blog earl$ head s0.csv … Continue reading

Posted in Data Munging, R, R Tip | Tagged , | Leave a comment

Examining CSV Data Columns From a Shell

It’s very handy to be able to pop open a shell and peek in your csv files. awk is a command that will do just that — it divides each line into fields based either on a whitespace separator or … Continue reading

Posted in Data Munging, R, R Tip | Tagged | Leave a comment

Eval in R: Running Code From a String

It’s (very) occasionally quite useful to be able to execute code from a string, similarly to eval in ruby or javascript. You might use this to, eg, read a directory full of csv files and turn each filename into a … Continue reading

Posted in R, R Tip | Leave a comment