search for: nzchar

Displaying 20 results from an estimated 105 matches for "nzchar".

Did you mean: nchar
2015 Apr 24
2
Development version of R: Improved nchar(), nzchar() but changed API
Those of you who track R development closely, will have noticed yesterday's commit of enhanced versions of nchar() and nzchar(). ------------------------------------------------------------------------ r68254 | maechler | 2015-04-23 18:06:37 +0200 (Thu, 23 Apr 2015) | 1 line Changed paths: M doc/NEWS.Rd M src/library/base/R/New-Internal.R M src/library/base/R/zzz.R M src/library/base/man/nchar.Rd M src/mai...
2012 Aug 06
1
issue with nzchar() ?
Dear all I'm a bit surprised by the results output from nzchar(). The help page says: "nzchar is a fast way to find out if elements of a character vector are *non-empty strings*." (my emphasis. However, if you do > x <- c(letters, NA, '') > nzchar(x) [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE [13] T...
2015 Apr 27
1
Development version of R: Improved nchar(), nzchar() but changed API
Dear Martin, Does the work on nchar mean that bugs #16090 and #16091 will be resolved [1,2]? Thanks, Mark [1] https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16090 [2] https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16091 On Sat, Apr 25, 2015 at 11:06 PM, James Cloos <cloos at jhcloos.com> wrote: > >>>>> "GC" == G?bor Cs?rdi <csardi.gabor at
2018 Dec 21
2
Bug report: R.home() cause package Rcpp failed executing sourceCpp, similar bug are labeled "BUG 16660" since 2016 and here I could provide a solution that tested in my laptop.
...ofile: unlockBinding("R.home", baseenv()) utils::assignInNamespace("R.home",function (component = "home") { rh <- .Internal(R.home()) paste0('"',switch(component, home = rh, bin = if (.Platform$OS.type == "windows" && nzchar(p <- .Platform$r_arch)) file.path(rh, component, p) else file.path(rh, component), share = if (nzchar(p <- Sys.getenv("R_SHARE_DIR"))) p else file.path(rh, component), doc = if (nzchar(p <- Sys.getenv("R_DOC_DIR"))) p else file.path(rh, component...
2009 Oct 22
1
Error in link in Rd file stops package installation
...rom a directory containing the .Rprofile file containing the line utils::assignInNamespace("tryCatch", function(expr, ...) expr, ns="base") then I get: ... is.regular html lag.zoo html Error in if (nzchar(file)) { : argument is of length zero * removing '/a/seafiler01.na.tibco.com/vol/vol2/users/bill/packages/Rlib3/zoo' * restoring previous '/a/seafiler01.na.tibco.com/vol/vol2/users/bill/packages/Rlib3/zoo' and I can grep around for 'if (nzchar(file))'. (Redefinin...
2020 Jun 26
1
"R CMD Sweave --driver=..." woes
...============================================================= --- src/library/utils/R/Sweave.R (revision 78746) +++ src/library/utils/R/Sweave.R (working copy) @@ -516,7 +516,7 @@ do_exit(1L) } args <- list(file=file, tangle=FALSE, latex=toPDF, engine=engine, clean=clean) - if(nzchar(driver)) args <- c(args, driver) + if(nzchar(driver)) args <- c(args, driver=driver) args <- c(args, encoding = encoding) if(nzchar(options)) { opts <- eval(str2expression(paste0("list(", options, ")")))
2015 Apr 24
2
Development version of R: Improved nchar(), nzchar() but changed API
On Fri, Apr 24, 2015 at 8:02 AM, G?k?en Eraslan <gokcen.eraslan at gmail.com> wrote: [...] > I don't want to hijack the thread but is there an easy way to track R > commits via e.g. an r-commits mail list (like this[1]) driven by a > subversion post-commit hook script? It would be quite nice for those who > want to follow every commit on daily basis. > You can watch (see
2015 Apr 24
2
Development version of R: Improved nchar(), nzchar() but changed API
On Fri, Apr 24, 2015 at 9:59 AM, G?k?en Eraslan <gokcen.eraslan at gmail.com> wrote: [...] > > But "Watch" only notifies when there are new pull requests and issues, > which doesn't make sense for the r-source repository. Following Github Atom > feed[1] sounds better, however the feed only provides commit messages not > the diffs. > Right, sorry, I
2012 Apr 20
1
R CMD check: Sys.getenv("R_GSCMD") cannot contain full pathname (contrary to docs)
...indows), it works. TROUBLESHOOTING: In the local function check_doc_size() of tools:::.check_packages() [cf. http://svn.r-project.org/R/trunk/src/library/tools/R/check.R], the Ghostscript executable is retrieved as: gs_cmd <- find_gs_cmd(Sys.getenv("R_GSCMD", "")) and if nzchar(gs_cmd) is FALSE, then the 'R CMD check' NOTE appears. Inspecting tools:::find_gs_cmd, this corresponds to gs_cmd <- Sys.which(Sys.getenv("R_GSCMD", "")) iff 'R_GSCMD' is set. In other words, tools:::find_gs_cmd() assumes a basename not a full pathname....
2018 Feb 20
3
Duplicate column names created by base::merge() when by.x has the same name as a column in y
...If by.x %in% names(y) then duplicate column names still arise, + ## apply suffixes to just y - this keeps backwards compatibility + ## when referring to by.x in the resulting data.frame + dupe.keyx <- intersect(nm.by, names(y)) + if(length(dupe.keyx)) { + if(nzchar(suffixes[2L])) + names(y)[match(dupe.keyx, names(y), 0L)] <- paste(dupe.keyx, suffixes[2L], sep="") + } nm <- c(names(x), names(y)) if(any(d <- duplicated(nm))) if(sum(d) > 1L) Best, Scott On 21 February 2018 at 08:23, <fr...
2011 Mar 27
1
Bug in tools::compactPDF() in 2.13-0-alpha
...of ?qpdf?, available from <URL: http://qpdf.sourceforge.net/>, including a Windows binary. If ?gs_cmd? is non-empty, GhostScript is used. I don't have qpdf on my system so planned to use ghostscript. However, the code for compactPDF() has as it's first few lines: if (!nzchar(Sys.which(qpdf))) return() So because I don't have qpdf, compactPDF() always returns NULL: > nzchar(Sys.which(Sys.getenv("R_QPDF", "qpdf"))) [1] FALSE > compactPDF("../analogue/pkg/inst/doc/analogue_methods.pdf", gs_cmd = "/usr/bin/") NU...
2018 Feb 22
2
Duplicate column names created by base::merge() when by.x has the same name as a column in y
...>> + ## apply suffixes to just y - this keeps backwards compatibility >> + ## when referring to by.x in the resulting data.frame >> + dupe.keyx <- intersect(nm.by, names(y)) >> + if(length(dupe.keyx)) { >> + if(nzchar(suffixes[2L])) >> + names(y)[match(dupe.keyx, names(y), 0L)] <- paste(dupe.keyx, >> suffixes[2L], sep="") >> + } >> nm <- c(names(x), names(y)) >> if(any(d <- duplicated(nm))) >> if(sum(d) > 1L)...
2015 Oct 03
1
issues with dev.new avoiding RStudio plot device on unix?
...s little point in specifying noRStudioGD=TRUE in the first place. If you consider the code used to determine whether quartz() or X11() is available dsp <- Sys.getenv("DISPLAY") if (.Platform$OS.type == "windows") windows else if (.Platform$GUI == "AQUA" || ((!nzchar(dsp) || grepl("^/tmp/launch-", dsp)) && .Call(C_makeQuartzDefault))) quartz else if (nzchar(dsp) && .Platform$GUI %in% c("X11", "Tk")) X11 else defdev you can see that it checks for a DISPLAY variable and assumes that X11 can be used if it is se...
2017 May 17
1
problem running test on a system without /etc/localtime
...-> normalizePath >> Execution halted >> >> This is caused by this code: >> >>> Sys.timezone >> function (location = TRUE) >> { >> tz <- Sys.getenv("TZ", names = FALSE) >> if (!location || nzchar(tz)) >> return(Sys.getenv("TZ", unset = NA_character_)) >>>> lt <- normalizePath("/etc/localtime") >> [remainder of the code skkipped] >> >> File /etc/loclatime is optional and is not guaranteed to be present on &gt...
2019 Dec 15
1
system2 doesn't quote stdin on unix, unlike stdout, stderr & input and on Windows
.../unix/system.unix.R (revision 77566) +++ src/library/base/R/unix/system.unix.R (working copy) @@ -102,7 +102,7 @@ writeLines(input, f) ## here 'command' is a single command, unlike system() command <- paste(command, "<", shQuote(f)) - } else if (nzchar(stdin)) command <- paste(command, "<", stdin) + } else if (nzchar(stdin)) command <- paste(command, "<", shQuote(stdin)) if(!wait && !intern) command <- paste(command, "&") .Internal(system(command, intern, timeout)) } -- Best...
2018 Feb 18
2
Duplicate column names created by base::merge() when by.x has the same name as a column in y
...%in% names(y) then duplicate column names still >> >>> arise, >> >>> + ## apply suffixes to these >> >>> + dupe.keyx <- intersect(nm.by, names(y)) >> >>> + if(length(dupe.keyx)) { >> >>> + if(nzchar(suffixes[1L])) >> >>> + names(x)[match(dupe.keyx, names(x), 0L)] <- >> >>> paste(dupe.keyx, suffixes[1L], sep="") >> >>> + if(nzchar(suffixes[2L])) >> >>> + names(y)[match(dupe.keyx, names(y), 0L...
2018 Feb 21
0
Duplicate column names created by base::merge() when by.x has the same name as a column in y
...en duplicate column names still arise, > + ## apply suffixes to just y - this keeps backwards compatibility > + ## when referring to by.x in the resulting data.frame > + dupe.keyx <- intersect(nm.by, names(y)) > + if(length(dupe.keyx)) { > + if(nzchar(suffixes[2L])) > + names(y)[match(dupe.keyx, names(y), 0L)] <- paste(dupe.keyx, > suffixes[2L], sep="") > + } > nm <- c(names(x), names(y)) > if(any(d <- duplicated(nm))) > if(sum(d) > 1L) > > Best, >...
2017 Oct 18
2
Another issue with Sys.timezone
...below, it would be useful on such systems as mine and the > > regression test would pass. > > > my.Sys.timezone <- > > function (location = TRUE) > > { > > tz <- Sys.getenv("TZ", names = FALSE) > > if (!location || nzchar(tz)) > > return(Sys.getenv("TZ", unset = NA_character_)) > > lt <- normalizePath("/etc/localtime") > > if (grepl(pat <- "^/usr/share/zoneinfo/", lt) || > > grepl(pat <- "^/usr/share/zoneinfo.default/&qu...
2018 Feb 23
0
Duplicate column names created by base::merge() when by.x has the same name as a column in y
...pply suffixes to just y - this keeps backwards > compatibility > >> + ## when referring to by.x in the resulting data.frame > >> + dupe.keyx <- intersect(nm.by, names(y)) > >> + if(length(dupe.keyx)) { > >> + if(nzchar(suffixes[2L])) > >> + names(y)[match(dupe.keyx, names(y), 0L)] <- > paste(dupe.keyx, > >> suffixes[2L], sep="") > >> + } > >> nm <- c(names(x), names(y)) > >> if(any(d <- duplicated(nm))) >...
2017 May 11
2
R 3.4.0 RPMS
...d failure. R is not able to establish the time zone inside the chroot and this triggers a regression tests which is new in R 3.4.0. Specifically, in file tests/reg-tests-1d.R this test fails: ## PR#17186 - Sys.timezone() on some Debian-derived platforms (S.t <- Sys.timezone()) if(is.na(S.t) || !nzchar(S.t)) stop("could not get timezone") ## has been NA_character_??in Ubuntu 14.04.5 LTS The work-around is to set the environment variable TZ to any non-empty string before running make check, in the %check section of the SPEC file, e.g. TZ="Europe/Paris" make check best regar...