[GRASS-stats] errors on spgrass Yosemite / homebrew

Rainer M Krug Rainer at krugs.de
Wed Jan 21 00:39:25 PST 2015


Hi

I tried to run

--8<---------------cut here---------------start------------->8---
library(spgrass)
examples(spgrass)
--8<---------------cut here---------------end--------------->8---

but I got an error - transcript below.

Let me know if I should try something out.

Cheers,

Rainer

,----
| 09:30:33 ~$ grass70 ~/Documents/spearfish60_grass7/user1/
| Cleaning up temporary files...
| Starting GRASS GIS...
| 
|           __________  ___   __________    _______________
|          / ____/ __ \/   | / ___/ ___/   / ____/  _/ ___/
|         / / __/ /_/ / /| | \__ \\_  \   / / __ / / \__ \
|        / /_/ / _, _/ ___ |___/ /__/ /  / /_/ // / ___/ /
|        \____/_/ |_/_/  |_/____/____/   \____/___//____/
| 
| Welcome to GRASS 7.0.0beta3
| GRASS homepage:                          http://grass.osgeo.org
| This version running through:            Bash Shell (/usr/local/bin/bash)
| Help is available with the command:      g.manual -i
| See the licence terms with:              g.version -c
| Start the GUI with:                      g.gui wxpython
| When ready to quit enter:                exit
| 
| GRASS 7.0.0beta3 (spearfish60_grass7):~ > R
| 
| R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet"
| Copyright (C) 2014 The R Foundation for Statistical Computing
| Platform: x86_64-apple-darwin14.1.0 (64-bit)
| 
| R is free software and comes with ABSOLUTELY NO WARRANTY.
| You are welcome to redistribute it under certain conditions.
| Type 'license()' or 'licence()' for distribution details.
| 
|   Natural language support but running in an English locale
| 
| R is a collaborative project with many contributors.
| Type 'contributors()' for more information and
| 'citation()' on how to cite R or R packages in publications.
| 
| Type 'demo()' for some demos, 'help()' for on-line help, or
| 'help.start()' for an HTML browser interface to help.
| Type 'q()' to quit R.
| 
| [Previously saved workspace restored]
| 
| > library(spgrass)
| Loading required package: sp
| Loading required package: XML
| GRASS GIS interface loaded with GRASS version: GRASS 7.0.0beta3 (2014)
| and location: spearfish60_grass7
| > example(spgrass)
| 
| spgrss> if (nchar(Sys.getenv("GISRC")) > 0) {
| spgrss+   require(rgdal)
| spgrss+   soilsph <- readRAST("soils.ph", ignore.stderr=TRUE, plugin=FALSE)
| spgrss+   summary(soilsph)
| spgrss+   grd <- gmeta2grd(ignore.stderr=TRUE)
| spgrss+   grd
| spgrss+   set.seed(1)
| spgrss+   pts <- spsample(soilsph, 200, "random")
| spgrss+   smple <- SpatialPointsDataFrame(pts, data=over(pts, soilsph))
| spgrss+   summary(smple)
| spgrss+   writeVECT(smple, "sp_dem", v.in.ogr_flags="overwrite", ignore.stderr=TRUE)
| spgrss+   bugsDF <- readVECT("bugsites", ignore.stderr=TRUE, mapset="PERMANENT")
| spgrss+   summary(bugsDF)
| spgrss+   vInfo("streams", ignore.stderr=TRUE)
| spgrss+   vColumns("streams", ignore.stderr=TRUE)
| spgrss+   vDataCount("streams", ignore.stderr=TRUE)
| spgrss+   streams <- readVECT("streams", type="line,boundary",
| spgrss+     remove.duplicates=FALSE, ignore.stderr=TRUE, plugin=FALSE)
| spgrss+   summary(streams)
| spgrss+ }
| Loading required package: rgdal
| rgdal: version: 0.9-1, (SVN revision 518)
| Geospatial Data Abstraction Library extensions to R successfully loaded
| Loaded GDAL runtime: GDAL 1.11.1, released 2014/09/24
| Path to GDAL shared files: /usr/local/Cellar/gdal/1.11.1_3/share/gdal
| Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
| Path to PROJ.4 shared files: (autodetected)
| Command: v.in.ogr
| Description: Imports vector data into a GRASS vector map using OGR library.
| Keywords: vector, import, OGR
| Parameters:
|   name: dsn, type: string, required: yes, multiple: no
| [Examples:
| 		ESRI Shapefile: directory containing shapefiles
| 		MapInfo File: directory containing mapinfo files]
|   name: layer, type: string, required: no, multiple: yes
| [Examples:
| 		ESRI Shapefile: shapefile name
| 		MapInfo File: mapinfo file name]
|   name: output, type: string, required: no, multiple: no
|   keydesc: name, keydesc_count: 1
| [Name for output vector map]
|   name: spatial, type: float, required: no, multiple: yes
|   keydesc: xmin,ymin,xmax,ymax, keydesc_count: 4
| [Format: xmin,ymin,xmax,ymax - usually W,S,E,N]
|   name: where, type: string, required: no, multiple: no
|   keydesc: sql_query, keydesc_count: 1
| [Example: income < 1000 and inhab >= 10000]
|   name: min_area, type: float, required: no, multiple: no
|   default: 0.0001
| [Smaller areas and islands are ignored. Should be greater than snap^2]
|   name: type, type: string, required: no, multiple: yes
|   default:
| [Optionally change default input type]
|   name: snap, type: float, required: no, multiple: no
|   default: -1
| ['-1' for no snap]
|   name: location, type: string, required: no, multiple: no
|   keydesc: name, keydesc_count: 1
| [Name for new location to create]
|   name: cnames, type: string, required: no, multiple: yes
| [List of column names to be used instead of original names, first is used for category column]
|   name: encoding, type: string, required: no, multiple: no
| [Overrides encoding interpretation, useful when importing ESRI Shapefile]
|   name: key, type: string, required: no, multiple: no
| [If not given, categories are generated as unique values and stored in 'cat' column]
| Flags:
|   name: f [List supported OGR formats and exit] {TRUE}
|   name: l [List available OGR layers in data source and exit] {TRUE}
|   name: c [Do not clean polygons (not recommended)] {FALSE}
|   name: 2 [Useful if input is 3D but all z coordinates are identical] {FALSE}
|   name: t [Do not create attribute table] {FALSE}
|   name: o [Override dataset projection (use location's projection)] {FALSE}
|   name: r [Limit import to the current region] {FALSE}
|   name: e [Also updates the default region if in the PERMANENT mapset] {FALSE}
|   name: w [Change column names to lowercase characters] {FALSE}
|   name: i [Create the location specified by the "location" parameter and exit. Do not import the vector data.] {FALSE}
|   name: overwrite [Allow output files to overwrite existing files] {FALSE}
|   name: help [Print usage summary] {FALSE}
|   name: verbose [Verbose module output] {FALSE}
|   name: quiet [Quiet module output] {FALSE}
| Error in insert_required(pcmd = pcmd, parameters = parameters, pt = pt,  :
|   required parameters with no defaults missing: dsn
|
| > traceback()
| 10: stop(paste("required parameters with no defaults missing:", paste(nadefnms1,
|         collapse = " ")))
| 9: insert_required(pcmd = pcmd, parameters = parameters, pt = pt,
|        req = req, suppress_required = suppress_required)
| 8: doGRASS(cmd, flags = flags, ..., parameters = parameters, echoCmd = echoCmd,
|        legacyExec = legacyExec)
| 7: execGRASS("v.in.ogr", flags = v.in.ogr_flags, input = GDSN, output = vname,
|        layer = LAYER, ignore.stderr = ignore.stderr)
| 6: writeVECT(smple, "sp_dem", v.in.ogr_flags = "overwrite", ignore.stderr = TRUE) at Rex5d28289dfd2d#18
| 5: eval(expr, envir, enclos)
| 4: eval(ei, envir)
| 3: withVisible(eval(ei, envir))
| 2: source(tf, local, echo = echo, prompt.echo = paste0(prompt.prefix,
|        getOption("prompt")), continue.echo = paste0(prompt.prefix,
|        getOption("continue")), verbose = verbose, max.deparse.length = Inf,
|        encoding = "UTF-8", skip.echo = skips, keep.source = TRUE)
| 1: example(spgrass)
| > version
|                _
| platform       x86_64-apple-darwin14.1.0
| arch           x86_64
| os             darwin14.1.0
| system         x86_64, darwin14.1.0
| status
| major          3
| minor          1.2
| year           2014
| month          10
| day            31
| svn rev        66913
| language       R
| version.string R version 3.1.2 (2014-10-31)
| nickname       Pumpkin Helmet
| > sessionInfo()
| R version 3.1.2 (2014-10-31)
| Platform: x86_64-apple-darwin14.1.0 (64-bit)
| 
| locale:
| [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
| 
| attached base packages:
| [1] stats     graphics  grDevices utils     datasets  methods   base
| 
| other attached packages:
| [1] rgdal_0.9-1   spgrass_0.1-0 XML_3.98-1.1  sp_1.0-16
| 
| loaded via a namespace (and not attached):
| [1] grid_3.1.2      lattice_0.20-29 tools_3.1.2
| >
`----



-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer at krugs.de

Skype:      RMkrug

PGP: 0x0F52F982
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-stats/attachments/20150121/57ab7b59/attachment.pgp>


More information about the grass-stats mailing list