Hi Carlos,
"This error does not show when using R instead of RStudio."
Then you probably need to use RStudio help channels. You *might* get lucky
here, but this is an R help list, not RStudio help.
Sarah
On Sun, Dec 23, 2018 at 7:44 AM Carlos Rodr?guez <arrowtado at gmail.com>
wrote:
Hi guys,
I have the following error when using Rstudio within GRASS 7.2.2
(stand-alone version) in Windows 10:
Location Spearfish_60
points <- readVECT("archsites")
Error in if (get("SYS", envir = .GRASS_CACHE) == "WinNat" && nchar(WN_bat)
== :
missing value where TRUE/FALSE needed
traceback()
7: parseGRASS(cmd, legacyExec = legacyExec)
6: doGRASS(cmd, flags = flags, ..., parameters = parameters, echoCmd =
echoCmd,
legacyExec = legacyExec)
5: execGRASS("v.in.ogr", flags = ifelse(ignore.stderr, c("f", "quiet"),
"f"), intern = TRUE, ignore.stderr = ignore.stderr)
4: .read_vect_non_plugin(vname = vname, layer = layer, type = type,
remove.duplicates = remove.duplicates, ignore.stderr =
ignore.stderr,
pointDropZ = pointDropZ, driver = driver, with_prj = with_prj,
with_c = with_c)
3: tryCatchList(expr, classes, parentenv, handlers)
2: tryCatch({
stopifnot(is.logical(plugin) || is.null(plugin))
stopifnot(is.logical(ignore.stderr))
if (missing(layer))
layer <- "1"
layer <- as.character(layer)
stopifnot(is.logical(with_c))
if (!is.null(driver) && driver == "GRASS")
plugin <- TRUE
if (!requireNamespace("rgdal", quietly = TRUE)) {
stop("rgdal not available")
}
if (is.null(plugin)) {
ogrD <- rgdal::ogrDrivers()$name
plugin <- "GRASS" %in% ogrD
}
if (plugin) {
res <- .read_vect_plugin(vname = vname, layer = layer,
type = type, ignore.stderr = ignore.stderr, pointDropZ =
pointDropZ,
mapset = mapset)
}
else {
res <- .read_vect_non_plugin(vname = vname, layer = layer,
type = type, remove.duplicates = remove.duplicates,
ignore.stderr = ignore.stderr, pointDropZ = pointDropZ,
driver = driver, with_prj = with_prj, with_c = with_c)
}
}, finally = {
if (get.suppressEchoCmdInFuncOption()) {
tull <- set.echoCmdOption(inEchoCmd)
}
})
1: readVECT("archsites")
This error does not show when using R instead of RStudio. I?ve searched
around and tried to implement the fixes proposed for similar issues
(unsuccessfully). I feel that it might be a very simple issue, but I am
stuck and I will appreciate any help. Here the Sys.getenv() and
sessionInfo(), in case there are needed.
Hi Carlos,
"This error does not show when using R instead of RStudio."
Then you probably need to use RStudio help channels. You *might* get lucky
here, but this is an R help list, not RStudio help.
Maybe also try https://lists.osgeo.org/mailman/listinfo/grass-stats, which
has a recent thread on this topic. I just tried Win10/GRASS 7.4/RStudio,
and had no trouble either running rgrass7::initGRASS() in RStudio started
on its own, or running rgrass::parseGRASS() in rstudio started in RStudio
started from the console command line inside GRASS. Consider following up
the thread on that list.
Roger
Sarah
On Sun, Dec 23, 2018 at 7:44 AM Carlos Rodr?guez <arrowtado at gmail.com>
wrote:
Hi guys,
I have the following error when using Rstudio within GRASS 7.2.2
(stand-alone version) in Windows 10:
Location Spearfish_60
points <- readVECT("archsites")
Error in if (get("SYS", envir = .GRASS_CACHE) == "WinNat" && nchar(WN_bat)
== :
missing value where TRUE/FALSE needed
traceback()
7: parseGRASS(cmd, legacyExec = legacyExec)
6: doGRASS(cmd, flags = flags, ..., parameters = parameters, echoCmd =
echoCmd,
legacyExec = legacyExec)
5: execGRASS("v.in.ogr", flags = ifelse(ignore.stderr, c("f", "quiet"),
"f"), intern = TRUE, ignore.stderr = ignore.stderr)
4: .read_vect_non_plugin(vname = vname, layer = layer, type = type,
remove.duplicates = remove.duplicates, ignore.stderr =
ignore.stderr,
pointDropZ = pointDropZ, driver = driver, with_prj = with_prj,
with_c = with_c)
3: tryCatchList(expr, classes, parentenv, handlers)
2: tryCatch({
stopifnot(is.logical(plugin) || is.null(plugin))
stopifnot(is.logical(ignore.stderr))
if (missing(layer))
layer <- "1"
layer <- as.character(layer)
stopifnot(is.logical(with_c))
if (!is.null(driver) && driver == "GRASS")
plugin <- TRUE
if (!requireNamespace("rgdal", quietly = TRUE)) {
stop("rgdal not available")
}
if (is.null(plugin)) {
ogrD <- rgdal::ogrDrivers()$name
plugin <- "GRASS" %in% ogrD
}
if (plugin) {
res <- .read_vect_plugin(vname = vname, layer = layer,
type = type, ignore.stderr = ignore.stderr, pointDropZ =
pointDropZ,
mapset = mapset)
}
else {
res <- .read_vect_non_plugin(vname = vname, layer = layer,
type = type, remove.duplicates = remove.duplicates,
ignore.stderr = ignore.stderr, pointDropZ = pointDropZ,
driver = driver, with_prj = with_prj, with_c = with_c)
}
}, finally = {
if (get.suppressEchoCmdInFuncOption()) {
tull <- set.echoCmdOption(inEchoCmd)
}
})
1: readVECT("archsites")
This error does not show when using R instead of RStudio. I?ve searched
around and tried to implement the fixes proposed for similar issues
(unsuccessfully). I feel that it might be a very simple issue, but I am
stuck and I will appreciate any help. Here the Sys.getenv() and
sessionInfo(), in case there are needed.