[GRASS-user] R/GRASS - Using GRASS output tables in R
Tim Besser
bessertim at gmx.de
Sat Jun 11 08:52:44 EDT 2011
Dear GRASS-users,
I think my upcoming question is quiet basic but however I could not find
a solution on my own so far. In GRASS you can export output tables via
">" to an external file. As I'm writing a script for data analysis in R
using spgrass6-package I'd like also to get the table (for example from
r.statistics, method=distribution) which is created in GRASS also as a
table or at least as single numerical values in R.
I tried my best with the "intern=T" command in R to write the output to
an R-object. That worked...However the values were then of class
"character". So what I did was using strsplit and in this way cutting
the object and using as.numerical. In the following step I created a
table. However, it's not very straight-forward and I am sure that there
is a "one command"-solution.
Thanks in advance for your help!
Cheers,
Tim
More information about the grass-user
mailing list