Re: [GRASS-stats] Cannot read raster or vector maps from GRASS within R

2019-10-23 Thread Veronica Andreo
Thanks Roger!
I just tried that and was about to write again saying "dismiss my previous
email" but you were faster! :)

El mié., 23 oct. 2019 a las 14:36, Roger Bivand ()
escribió:

> On Wed, 23 Oct 2019, Veronica Andreo wrote:
>
> > Hi
> >
> > I'm trying to read raster and vector maps from GRASS (located in my
> > grassdata) into R as I used to do until last month, but I'm getting the
> > following error:
> >
> >> library(rgrass7)
> > Loading required package: XML
> > GRASS GIS interface loaded with GRASS version: GRASS 7.8.1dev (2019)
> > and location: nc_basic_spm_grass7
> >> use_sf()
> >> v <- readVECT(roadsmajor)
> > Error in doGRASS(cmd, flags = flags, ..., parameters = parameters,
> echoCmd
> > = echoCmd,  :
> >  object 'roadsmajor' not found
>
> v <- readVECT("roadsmajor")
> # maybe - it isn't an object in the R workspace
>
> Roger
>
> >> execGRASS("g.list", parameters=list(type="vector"))
> > hospitals
> > nc_state
> > points_of_interest
> > railroads
> > roadsmajor <-- it is there
> > schools
> >
> > I tested with grass76 and 78 in case it could be some python issue (76 is
> > python 2 and 78 is python 3), but I'm getting the same error with both
> > GRASS versions.
> >
> > Has anything changed since september? This worked at the opengeohub
> summer
> > school.
> >
> > I paste the session info below. Thanks in advance for any help :)
> >
> > Vero
> >
> >
> > ---
> > sessionInfo()
> > R version 3.6.1 (2019-07-05)
> > Platform: x86_64-redhat-linux-gnu (64-bit)
> > Running under: Fedora 30 (Thirty)
> >
> > Matrix products: default
> > BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
> >
> > locale:
> > [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
> > [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
> > [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
> > [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
> > [9] LC_ADDRESS=C   LC_TELEPHONE=C
> > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
> >
> > attached base packages:
> > [1] stats graphics  grDevices utils datasets  methods   base
> >
> > other attached packages:
> > [1] rgrass7_0.2-1 XML_3.98-1.20
> >
> > loaded via a namespace (and not attached):
> > [1] tidyselect_0.2.5   purrr_0.3.2reshape2_1.4.3 sf_0.8-0
> >
> > [5] splines_3.6.1  lattice_0.20-38colorspace_1.4-1
> > generics_0.0.2
> > [9] stars_0.3-1stats4_3.6.1   survival_2.44-1.1
> > prodlim_2018.04.18
> > [13] rlang_0.4.0ModelMetrics_1.2.2 e1071_1.7-2
> pillar_1.4.2
> >
> > [17] glue_1.3.1 withr_2.1.2DBI_1.0.0
> foreach_1.4.7
> >
> > [21] plyr_1.8.4 lava_1.6.6 stringr_1.4.0
> > timeDate_3043.102
> > [25] munsell_0.5.0  gtable_0.3.0   recipes_0.1.7
> > codetools_0.2-16
> > [29] caret_6.0-84   parallel_3.6.1 class_7.3-15   Rcpp_1.0.2
> >
> > [33] KernSmooth_2.23-15 scales_1.0.0   classInt_0.4-1 ipred_0.9-9
> >
> > [37] abind_1.4-5ggplot2_3.2.1  stringi_1.4.3  dplyr_0.8.3
> >
> > [41] grid_3.6.1 tools_3.6.1magrittr_1.5
> > lazyeval_0.2.2
> > [45] tibble_2.1.3   crayon_1.3.4   pkgconfig_2.0.3
> MASS_7.3-51.4
> >
> > [49] Matrix_1.2-17  data.table_1.12.2  lubridate_1.7.4gower_0.2.1
> >
> > [53] assertthat_0.2.1   iterators_1.0.12   R6_2.4.0
>  rpart_4.1-15
> >
> > [57] units_0.6-4nnet_7.3-12nlme_3.1-140
> > compiler_3.6.1
> >
>
> --
> Roger Bivand
> Department of Economics, Norwegian School of Economics,
> Helleveien 30, N-5045 Bergen, Norway.
> voice: +47 55 95 93 55; e-mail: roger.biv...@nhh.no
> https://orcid.org/-0003-2392-6140
> https://scholar.google.no/citations?user=AWeghB0J=en
>
___
grass-stats mailing list
grass-stats@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-stats

Re: [GRASS-stats] Cannot read raster or vector maps from GRASS within R

2019-10-23 Thread Roger Bivand

On Wed, 23 Oct 2019, Veronica Andreo wrote:


Hi

I'm trying to read raster and vector maps from GRASS (located in my
grassdata) into R as I used to do until last month, but I'm getting the
following error:


library(rgrass7)

Loading required package: XML
GRASS GIS interface loaded with GRASS version: GRASS 7.8.1dev (2019)
and location: nc_basic_spm_grass7

use_sf()
v <- readVECT(roadsmajor)

Error in doGRASS(cmd, flags = flags, ..., parameters = parameters, echoCmd
= echoCmd,  :
 object 'roadsmajor' not found


v <- readVECT("roadsmajor")
# maybe - it isn't an object in the R workspace

Roger


execGRASS("g.list", parameters=list(type="vector"))

hospitals
nc_state
points_of_interest
railroads
roadsmajor <-- it is there
schools

I tested with grass76 and 78 in case it could be some python issue (76 is
python 2 and 78 is python 3), but I'm getting the same error with both
GRASS versions.

Has anything changed since september? This worked at the opengeohub summer
school.

I paste the session info below. Thanks in advance for any help :)

Vero


---
sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 30 (Thirty)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
[1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8   LC_NAME=C
[9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

other attached packages:
[1] rgrass7_0.2-1 XML_3.98-1.20

loaded via a namespace (and not attached):
[1] tidyselect_0.2.5   purrr_0.3.2reshape2_1.4.3 sf_0.8-0

[5] splines_3.6.1  lattice_0.20-38colorspace_1.4-1
generics_0.0.2
[9] stars_0.3-1stats4_3.6.1   survival_2.44-1.1
prodlim_2018.04.18
[13] rlang_0.4.0ModelMetrics_1.2.2 e1071_1.7-2pillar_1.4.2

[17] glue_1.3.1 withr_2.1.2DBI_1.0.0  foreach_1.4.7

[21] plyr_1.8.4 lava_1.6.6 stringr_1.4.0
timeDate_3043.102
[25] munsell_0.5.0  gtable_0.3.0   recipes_0.1.7
codetools_0.2-16
[29] caret_6.0-84   parallel_3.6.1 class_7.3-15   Rcpp_1.0.2

[33] KernSmooth_2.23-15 scales_1.0.0   classInt_0.4-1 ipred_0.9-9

[37] abind_1.4-5ggplot2_3.2.1  stringi_1.4.3  dplyr_0.8.3

[41] grid_3.6.1 tools_3.6.1magrittr_1.5
lazyeval_0.2.2
[45] tibble_2.1.3   crayon_1.3.4   pkgconfig_2.0.3MASS_7.3-51.4

[49] Matrix_1.2-17  data.table_1.12.2  lubridate_1.7.4gower_0.2.1

[53] assertthat_0.2.1   iterators_1.0.12   R6_2.4.0   rpart_4.1-15

[57] units_0.6-4nnet_7.3-12nlme_3.1-140
compiler_3.6.1



--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: roger.biv...@nhh.no
https://orcid.org/-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0J=en
___
grass-stats mailing list
grass-stats@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-stats