Hi

I am working with spgrass6 package and GRASS v.6.2. Everything was fine until I tryed to read a vector file with readVECT6 (and other related vector commands, like vInfo). When I ran these commands, the problem immediately appeared (" Sorry, is not a valid flag" ).

Ok, the solution is easy:

- You have to download the spgrass package within a folder, in order to install the package from this directory. You should type (being in R)

download.packages( "spgrass6" , destdir="/thef/folder/that/you/want/" )

in my computer, "the/folder/that/you/want/" = "/home/jdgiraldo/R/downloaded_packages" (I had created "/downloaded_packages" earlier ).

- Ok. Unzip the spgrass6_0.6-14.tar.gz file (this is my downloaded version).

- Open the vect_link.R file. It must be located in "the/folder/that/you/want/spgrass6/R" folder.

- Now, go to the line 218. You'll find the next line

        vinfo0 <- execGRASS("v.info", flags="t" , parameters=list(map=vname),
                intern=TRUE, ignore.stderr=ignore.stderr)

and it should be changed into

        vinfo0 <- execGRASS("v.info", flags="g" , parameters=list(map=vname),
                intern=TRUE, ignore.stderr=ignore.stderr)

Did you see??? A little "t" is hateful. I think it was a typing mistake.

- Save and close the vect_link.R file.

- Install the modified spgrass6 package. Use

install.package( "/home/jdgiraldo/R/downloaded_packages/spgrass6" , repos=NULL )

- It's ready to use.

I hope this information will be useful.

Juan Diego

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to