[GRASSLIST:7650] R Stats and GRASS primer (wanted)

Even before I can finish my current project I'm looking to the future.

I would like to gather some resources on combining R stats and GRASS. I found tutorial from a while ago at
http://reclus.nhh.no/gc00/gc009.htm
not sure if all the commands are still relavent or if the datasets they use still exist. as its older version of GRASS and R

I wouldn't mind if people submitted more samples of how they used R Stats and GRASS. If they are examples on spearfish data that is even better because we all have it.

Cheers

--
+---------------------------------------------------------------+
|Dave Sampson: Geographic Information System (GIS) Technician |
| |
|Centre for Sustainable Watersheds |
|Cooperative Approaches to Protect Canada's Water Resources |
| |
|14 Water St, P.O Box 280. Portland Ontario, Canada. K0G 1V0 |
|Lat: 44.700 Long: -76.19 |
|www.watersheds.ca gis@watersheds.ca |
+---------------------------------------------------------------+

On Wed, 20 Jul 2005, Dave Sampson wrote:

Even before I can finish my current project I'm looking to the future.

Way to go! :slight_smile: I'd like to echo this request, as I'd like to upskill in
this area as well.

I'm providing GIS support to teams with several statisticians/modellers
who are R users. I'm not making much use of GRASS coz I haven't really
needed to, but (looking to the future :slight_smile: I'd like to be able to build up
expertise in GRASS (in addition to what I do now with PostGIS/QGIS/GMT)
with demonstrable links to R.

Personally I believe a well set up PostGIS/GRASS/R suite is
potentially about the most powerful analytical GIS around, and that
working towards such a system is therefore a very useful sxercise.
Throw mapserver/uDIG & others at this and you can even web enable it
without a huge effort. Throw QGIS & you have user friendly browsing &
a nice GRASS GUI.

While I have no immediate use, (but do have an immediate lack of skills
& time) I'd love to see a wiki or some easily accessible resource
providing information a sort of GRASS & R howto, so I could at least keep
in touch with this particular area....

I would like to gather some resources on combining R stats and GRASS. I
found tutorial from a while ago at
http://reclus.nhh.no/gc00/gc009.htm
not sure if all the commands are still relavent or if the datasets they
use still exist. as its older version of GRASS and R

I wouldn't mind if people submitted more samples of how they used R
Stats and GRASS. If they are examples on spearfish data that is even
better because we all have it.

Thanks Dave,

  Brent Wood

Hi Dave,

On Wed, Jul 20, 2005 at 05:54:28PM -0400, Dave Sampson wrote:

Even before I can finish my current project I'm looking to the future.

I would like to gather some resources on combining R stats and GRASS. I
found tutorial from a while ago at
http://reclus.nhh.no/gc00/gc009.htm
not sure if all the commands are still relavent or if the datasets they
use still exist. as its older version of GRASS and R

I wouldn't mind if people submitted more samples of how they used R
Stats and GRASS. If they are examples on spearfish data that is even
better because we all have it.

Here we go with some suggestions:

- related web page:
  http://grass.itc.it/statsgrass/index.php
  -> GRASS 6.x: GRASS6-R interface (installation: see here)
  -> Short draft introduction to R/GRASS interface (evolving,
     needs some GRASS 6 updates)
  -> Bivand, R.S., 2005. Interfacing GRASS 6 and R. Status and development directions.
     GRASS Newsletter, Vol.3, pp 11-16, June 2005 (PDF).

- Short Courses:
  http://mpa.itc.it/grasstutor/shortcourse_menu.phtml
  -> Open Source GIS Short Course (2003) - GRASS 5, but maybe still
     interesting anyway
  -> Open Source Geoinformatics with GRASS GIS (2005) - GRASS 6
     (I guess you know this one :slight_smile:

- R spatial projects
  http://agec221.agecon.uiuc.edu/csiss/Rgeo/

More forthcoming...

Markus

--
Markus Neteler <neteler itc it> http://mpa.itc.it
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

Hi, List,

I also want to make R/GRASS6.0 work on my machine. Is there a special
installation when GRASS sitting on the server and I run R/GRASS on my local
Suse OS system?

Feng

On Thursday 21 July 2005 03:15, Markus Neteler wrote:

Hi Dave,

On Wed, Jul 20, 2005 at 05:54:28PM -0400, Dave Sampson wrote:
> Even before I can finish my current project I'm looking to the future.
>
> I would like to gather some resources on combining R stats and GRASS. I
> found tutorial from a while ago at
> http://reclus.nhh.no/gc00/gc009.htm
> not sure if all the commands are still relavent or if the datasets they
> use still exist. as its older version of GRASS and R
>
> I wouldn't mind if people submitted more samples of how they used R
> Stats and GRASS. If they are examples on spearfish data that is even
> better because we all have it.

Here we go with some suggestions:

- related web page:
  http://grass.itc.it/statsgrass/index.php
  -> GRASS 6.x: GRASS6-R interface (installation: see here)
  -> Short draft introduction to R/GRASS interface (evolving,
     needs some GRASS 6 updates)
  -> Bivand, R.S., 2005. Interfacing GRASS 6 and R. Status and development
directions. GRASS Newsletter, Vol.3, pp 11-16, June 2005 (PDF).

- Short Courses:
  http://mpa.itc.it/grasstutor/shortcourse_menu.phtml
  -> Open Source GIS Short Course (2003) - GRASS 5, but maybe still
     interesting anyway
  -> Open Source Geoinformatics with GRASS GIS (2005) - GRASS 6
     (I guess you know this one :slight_smile:

- R spatial projects
  http://agec221.agecon.uiuc.edu/csiss/Rgeo/

More forthcoming...

Markus

hi, Markus,

When I installing the R/GRASS6.0 interface using your instruction , the
following error showed:

install.packages(c("sp","rgdal","maptools"), dependencies=TRUE)

--- Please select a CRAN mirror for use in this session ---
Error in inherits(x, "factor") : Object "res" not found

what happened?

Thanks,

Feng

On Thursday 21 July 2005 03:15, Markus Neteler wrote:

[GRASSLIST:7657] Re: R Stats and GRASS primer (wanted)

From:
Markus Neteler

Hi Feng,

I always launched update.packages() before installing the
sp things. Then a Tcl window pops up where I select a mirror
site.

Or: probably you tcl/tk libraries are not installed [properly]?

Markus

On Fri, Jul 22, 2005 at 09:23:44AM -0600, Feng Tan wrote:

hi, Markus,

When I installing the R/GRASS6.0 interface using your instruction , the
following error showed:

> install.packages(c("sp","rgdal","maptools"), dependencies=TRUE)
--- Please select a CRAN mirror for use in this session ---
Error in inherits(x, "factor") : Object "res" not found

what happened?

Thanks,

Feng

On Thursday 21 July 2005 03:15, Markus Neteler wrote:
> [GRASSLIST:7657] Re: R Stats and GRASS primer (wanted)
>
> From:
> Markus Neteler

--
Markus Neteler <neteler itc it> http://mpa.itc.it
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

This does not happen is a graphic window is not active (e.g. for installations
over ssh, or if root does not have a graphical window).
The solution is to specify the mirror to use.
All the best.
pc
At 10:04, sabato 23 luglio 2005, Markus Neteler has probably written:

Hi Feng,

I always launched update.packages() before installing the
sp things. Then a Tcl window pops up where I select a mirror
site.

Or: probably you tcl/tk libraries are not installed [properly]?

Markus

On Fri, Jul 22, 2005 at 09:23:44AM -0600, Feng Tan wrote:
> hi, Markus,
>
> When I installing the R/GRASS6.0 interface using your instruction , the
>
> following error showed:
> > install.packages(c("sp","rgdal","maptools"), dependencies=TRUE)
>
> --- Please select a CRAN mirror for use in this session ---
> Error in inherits(x, "factor") : Object "res" not found
>
> what happened?
>
> Thanks,
>
> Feng
>
> On Thursday 21 July 2005 03:15, Markus Neteler wrote:
> > [GRASSLIST:7657] Re: R Stats and GRASS primer (wanted)
> >
> > From:
> > Markus Neteler

--
Paolo Cavallini
cavallini@faunalia.it www.faunalia.it www.faunalia.com
Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy Tel: (+39)348-3801953

Hi, Makkus,

If I use my own user's root directory, the mirror site menu will show up, but
the following errors show up:

mkdir: cannot create directory `/usr/lib/R/library/00LOCK': Permission denied
ERROR: failed to lock directory '/usr/lib/R/library' for modifying
mkdir: cannot create directory `/usr/lib/R/library/00LOCK': Permission denied
ERROR: failed to lock directory '/usr/lib/R/library' for modifying
mkdir: cannot create directory `/usr/lib/R/library/00LOCK': Permission denied
ERROR: failed to lock directory '/usr/lib/R/library' for modifying
mkdir: cannot create directory `/usr/lib/R/library/00LOCK': Permission denied
ERROR: failed to lock directory '/usr/lib/R/library' for modifying
mkdir: cannot create directory `/usr/lib/R/library/00LOCK': Permission denied
ERROR: failed to lock directory '/usr/lib/R/library' for modifying
mkdir: cannot create directory `/usr/lib/R/library/00LOCK': Permission denied
ERROR: failed to lock directory '/usr/lib/R/library' for modifying
mkdir: cannot create directory `/usr/lib/R/library/00LOCK': Permission denied
ERROR: failed to lock directory '/usr/lib/R/library' for modifying

The downloaded packages are in
        /tmp/Rtmpny7325/downloaded_packages
Warning messages:
1: installation of package 'abind' had non-zero exit status in:
install.packages(c("sp", "rgdal", "maptools"), dependencies = TRUE)
2: installation of package 'pixmap' had non-zero exit status in:
install.packages(c("sp", "rgdal", "maptools"), dependencies = TRUE)
3: installation of package 'RColorBrewer' had non-zero exit status in:
install.packages(c("sp", "rgdal", "maptools"), dependencies = TRUE)
4: installation of package 'splancs' had non-zero exit status in:
install.packages(c("sp", "rgdal", "maptools"), dependencies = TRUE)
5: installation of package 'sp' had non-zero exit status in:
install.packages(c("sp", "rgdal", "maptools"), dependencies = TRUE)
6: installation of package 'maptools' had non-zero exit status in:
install.packages(c("sp", "rgdal", "maptools"), dependencies = TRUE)
7: installation of package 'rgdal' had non-zero exit status in:
install.packages(c("sp", "rgdal", "maptools"), dependencies = TRUE)

Thanks,

Feng

On Saturday 23 July 2005 02:04, Markus Neteler wrote:

Hi Feng,

I always launched update.packages() before installing the
sp things. Then a Tcl window pops up where I select a mirror
site.

Or: probably you tcl/tk libraries are not installed [properly]?

Markus

On Fri, Jul 22, 2005 at 09:23:44AM -0600, Feng Tan wrote:
> hi, Markus,
>
> When I installing the R/GRASS6.0 interface using your instruction , the
>
> following error showed:
> > install.packages(c("sp","rgdal","maptools"), dependencies=TRUE)
>
> --- Please select a CRAN mirror for use in this session ---
> Error in inherits(x, "factor") : Object "res" not found
>
> what happened?
>
> Thanks,
>
> Feng
>
> On Thursday 21 July 2005 03:15, Markus Neteler wrote:
> > [GRASSLIST:7657] Re: R Stats and GRASS primer (wanted)
> >
> > From:
> > Markus Neteler

Hi Feng

It seems that you are not doing it as super user.
Change to SU mode; then start R and install.packages

HTH

Jaime

--- Feng Tan <feng@lynxseismicdata.com> escribió:

Hi, Makkus,

If I use my own user's root directory, the mirror
site menu will show up, but
the following errors show up:

mkdir: cannot create directory
`/usr/lib/R/library/00LOCK': Permission denied
ERROR: failed to lock directory '/usr/lib/R/library'
for modifying
mkdir: cannot create directory
`/usr/lib/R/library/00LOCK': Permission denied
ERROR: failed to lock directory '/usr/lib/R/library'
for modifying
mkdir: cannot create directory
`/usr/lib/R/library/00LOCK': Permission denied
ERROR: failed to lock directory '/usr/lib/R/library'
for modifying
mkdir: cannot create directory
`/usr/lib/R/library/00LOCK': Permission denied
ERROR: failed to lock directory '/usr/lib/R/library'
for modifying
mkdir: cannot create directory
`/usr/lib/R/library/00LOCK': Permission denied
ERROR: failed to lock directory '/usr/lib/R/library'
for modifying
mkdir: cannot create directory
`/usr/lib/R/library/00LOCK': Permission denied
ERROR: failed to lock directory '/usr/lib/R/library'
for modifying
mkdir: cannot create directory
`/usr/lib/R/library/00LOCK': Permission denied
ERROR: failed to lock directory '/usr/lib/R/library'
for modifying

The downloaded packages are in
        /tmp/Rtmpny7325/downloaded_packages
Warning messages:
1: installation of package 'abind' had non-zero exit
status in:
install.packages(c("sp", "rgdal", "maptools"),
dependencies = TRUE)
2: installation of package 'pixmap' had non-zero
exit status in:
install.packages(c("sp", "rgdal", "maptools"),
dependencies = TRUE)
3: installation of package 'RColorBrewer' had
non-zero exit status in:
install.packages(c("sp", "rgdal", "maptools"),
dependencies = TRUE)
4: installation of package 'splancs' had non-zero
exit status in:
install.packages(c("sp", "rgdal", "maptools"),
dependencies = TRUE)
5: installation of package 'sp' had non-zero exit
status in:
install.packages(c("sp", "rgdal", "maptools"),
dependencies = TRUE)
6: installation of package 'maptools' had non-zero
exit status in:
install.packages(c("sp", "rgdal", "maptools"),
dependencies = TRUE)
7: installation of package 'rgdal' had non-zero exit
status in:
install.packages(c("sp", "rgdal", "maptools"),
dependencies = TRUE)

Thanks,

Feng

On Saturday 23 July 2005 02:04, Markus Neteler
wrote:
> Hi Feng,
>
> I always launched update.packages() before
installing the
> sp things. Then a Tcl window pops up where I
select a mirror
> site.
>
> Or: probably you tcl/tk libraries are not
installed [properly]?
>
> Markus
>
> On Fri, Jul 22, 2005 at 09:23:44AM -0600, Feng Tan
wrote:
> > hi, Markus,
> >
> > When I installing the R/GRASS6.0 interface using
your instruction , the
> >
> > following error showed:
> > > install.packages(c("sp","rgdal","maptools"),
dependencies=TRUE)
> >
> > --- Please select a CRAN mirror for use in this
session ---
> > Error in inherits(x, "factor") : Object "res"
not found
> >
> > what happened?
> >
> > Thanks,
> >
> > Feng
> >
> > On Thursday 21 July 2005 03:15, Markus Neteler
wrote:
> > > [GRASSLIST:7657] Re: R Stats and GRASS primer
(wanted)
> > >
> > > From:
> > > Markus Neteler

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
Regístrate ya - http://correo.espanol.yahoo.com/

Hi, List,

Thanks for your help!! I have successfully installed GRASS6.0/R. It works on
spearfish test dataset. But when I run my own dataset which have worked for
GRASS5.7/R does not work for GRASS6.0/R, it said:"cannot find function
rast.get() ". Please help!!

Thanks!

Feng

On Saturday 23 July 2005 02:04, Markus Neteler wrote:

Hi Feng,

I always launched update.packages() before installing the
sp things. Then a Tcl window pops up where I select a mirror
site.

Or: probably you tcl/tk libraries are not installed [properly]?

Markus

On Fri, Jul 22, 2005 at 09:23:44AM -0600, Feng Tan wrote:
> hi, Markus,
>
> When I installing the R/GRASS6.0 interface using your instruction , the
>
> following error showed:
> > install.packages(c("sp","rgdal","maptools"), dependencies=TRUE)
>
> --- Please select a CRAN mirror for use in this session ---
> Error in inherits(x, "factor") : Object "res" not found
>
> what happened?
>
> Thanks,
>
> Feng
>
> On Thursday 21 July 2005 03:15, Markus Neteler wrote:
> > [GRASSLIST:7657] Re: R Stats and GRASS primer (wanted)
> >
> > From:
> > Markus Neteler

Feng,

Go to CRAN (http://cran.r-project.org/) to the Newsletter section and get the Volume 5/1, May 2005 issue. There is an article on the new GRASS/R interface that's needed with R 2.1 & GRASS 6.x. Hope this helps.

Tom

Feng Tan wrote:

Hi, List,

Thanks for your help!! I have successfully installed GRASS6.0/R. It works on spearfish test dataset. But when I run my own dataset which have worked for GRASS5.7/R does not work for GRASS6.0/R, it said:"cannot find function rast.get() ". Please help!!

Thanks!

Feng

On Saturday 23 July 2005 02:04, Markus Neteler wrote:

Hi Feng,

I always launched update.packages() before installing the
sp things. Then a Tcl window pops up where I select a mirror
site.

Or: probably you tcl/tk libraries are not installed [properly]?

Markus

On Fri, Jul 22, 2005 at 09:23:44AM -0600, Feng Tan wrote:
   

hi, Markus,

When I installing the R/GRASS6.0 interface using your instruction , the

following error showed:
     

install.packages(c("sp","rgdal","maptools"), dependencies=TRUE)
       

--- Please select a CRAN mirror for use in this session ---
Error in inherits(x, "factor") : Object "res" not found

what happened?

Thanks,

Feng

On Thursday 21 July 2005 03:15, Markus Neteler wrote:
     

[GRASSLIST:7657] Re: R Stats and GRASS primer (wanted)

From:
Markus Neteler
       
--
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177

EMAIL: thomas.adams@noaa.gov

VOICE: 937-383-0528
FAX: 937-383-0033

On Tue, 16 Aug 2005, Thomas Adams wrote:

Feng,

Go to CRAN (http://cran.r-project.org/) to the Newsletter section and
get the Volume 5/1, May 2005 issue. There is an article on the new
GRASS/R interface that's needed with R 2.1 & GRASS 6.x. Hope this helps.

Please make that: http://grass.itc.it/newsletter/index.php - the article
is the the GRASS Newsletter volume 3, June 2005, pp. 11-16, and an erratum
is there too for difficulties installing on a server rather than a
workstation.

rast.get() is replaced in the new framework by readFLOATsp() and
readCELLsp(), so you will have to change your code; in addition, the
objects returned are different too.

Roger

Tom

Feng Tan wrote:

>Hi, List,
>
>Thanks for your help. I have successfully installed GRASS6.0/R. It works on
>spearfish test dataset. But when I run my own dataset which have worked for
>GRASS5.7/R does not work for GRASS6.0/R, it said:"cannot find function
>rast.get() ". Please help!!
>
>Thanks!
>
>Feng
>
>
>
>On Saturday 23 July 2005 02:04, Markus Neteler wrote:
>
>
>>Hi Feng,
>>
>>I always launched update.packages() before installing the
>>sp things. Then a Tcl window pops up where I select a mirror
>>site.
>>
>>Or: probably you tcl/tk libraries are not installed [properly]?
>>
>>Markus
>>
>>On Fri, Jul 22, 2005 at 09:23:44AM -0600, Feng Tan wrote:
>>
>>
>>>hi, Markus,
>>>
>>>When I installing the R/GRASS6.0 interface using your instruction , the
>>>
>>>following error showed:
>>>
>>>
>>>>install.packages(c("sp","rgdal","maptools"), dependencies=TRUE)
>>>>
>>>>
>>>--- Please select a CRAN mirror for use in this session ---
>>>Error in inherits(x, "factor") : Object "res" not found
>>>
>>>what happened?
>>>
>>>Thanks,
>>>
>>>Feng
>>>
>>>On Thursday 21 July 2005 03:15, Markus Neteler wrote:
>>>
>>>
>>>>[GRASSLIST:7657] Re: R Stats and GRASS primer (wanted)
>>>>
>>>>From:
>>>>Markus Neteler
>>>>
>>>>
>
>
>

--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand@nhh.no

Roger & Feng,

Ooops. Should have double checked before I posted. Thanks for the correction, Roger! BTW, I should have my plans to pass through Bergen in Oct. on my way to Tromso settled by the end of August. I'll let you know.

Regards,
Tom

Roger Bivand wrote:

On Tue, 16 Aug 2005, Thomas Adams wrote:

Feng,

Go to CRAN (http://cran.r-project.org/) to the Newsletter section and get the Volume 5/1, May 2005 issue. There is an article on the new GRASS/R interface that's needed with R 2.1 & GRASS 6.x. Hope this helps.
   
Please make that: http://grass.itc.it/newsletter/index.php - the article is the the GRASS Newsletter volume 3, June 2005, pp. 11-16, and an erratum is there too for difficulties installing on a server rather than a workstation.

rast.get() is replaced in the new framework by readFLOATsp() and readCELLsp(), so you will have to change your code; in addition, the objects returned are different too.

Roger

Tom

Feng Tan wrote:

Hi, List,

Thanks for your help. I have successfully installed GRASS6.0/R. It works on spearfish test dataset. But when I run my own dataset which have worked for GRASS5.7/R does not work for GRASS6.0/R, it said:"cannot find function rast.get() ". Please help!!

Thanks!

Feng

On Saturday 23 July 2005 02:04, Markus Neteler wrote:

Hi Feng,

I always launched update.packages() before installing the
sp things. Then a Tcl window pops up where I select a mirror
site.

Or: probably you tcl/tk libraries are not installed [properly]?

Markus

On Fri, Jul 22, 2005 at 09:23:44AM -0600, Feng Tan wrote:
  

hi, Markus,

When I installing the R/GRASS6.0 interface using your instruction , the

following error showed:
    

install.packages(c("sp","rgdal","maptools"), dependencies=TRUE)
      

--- Please select a CRAN mirror for use in this session ---
Error in inherits(x, "factor") : Object "res" not found

what happened?

Thanks,

Feng

On Thursday 21 July 2005 03:15, Markus Neteler wrote:
    

[GRASSLIST:7657] Re: R Stats and GRASS primer (wanted)

From:
Markus Neteler
      
--
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177

EMAIL: thomas.adams@noaa.gov

VOICE: 937-383-0528
FAX: 937-383-0033