search for: squot

Displaying 20 results from an estimated 141 matches for "squot".

Did you mean: quot
2007 Oct 14
1
Inconsistent behavior of sQuote and dQuote
Dear all When comparing sQuote("text") and dQuote("text") on MacOS X and Linux FC4 I get an inconsistent behavior (using the new release version R-2.6.0): sQuote: On Mac I get the correct result "'text'", but on FC4 the incorrect result "`text?". dQuote: On Mac I get the correct...
2010 Jan 18
0
RFE: bQuote like sQuote
I'm writing SQL queries, and it's very handy to be able to use sQuote for string parameter values. It makes me wish that I could use an sQuote-like function for enclosing column names and other identifiers in backticks, i.e., select `foo` from `table`. Obviously I can do this with paste(), I'm just asking for syntactic sugar. Oh, a buglet: the sQuote help page,...
2020 Aug 19
2
Stale link from ?check to R Internals
...================================================================== --- src/library/utils/man/PkgUtils.Rd (revision 79049) +++ src/library/utils/man/PkgUtils.Rd (working copy) @@ -40,7 +40,7 @@ set by environment variables \env{_R_BUILD_RESAVE_DATA_} and \env{_R_BUILD_COMPACT_VIGNETTES_}: see \sQuote{Writing \R Extensions}. Many of the checks in \command{R CMD check} can be turned off or on by - environment variables: see Chapter 6 of the \sQuote{R Internals} manual. + environment variables: see Chapter "Tools" of the \sQuote{R Internals} manual. By default \command{R CMD bu...
2018 Apr 08
2
suggested patch for messages
...-7727,8 +7727,10 @@ "The Title field starts with the package name." }, if(length(y <- x$title_case)) { - paste(c("The Title field should be in title case, current version then in title case:", - sQuote(y)), + paste(c("The Title field should be in title case. Current version is:", + sQuote(y[1]), + "In title case this would be:", + sQuote(y[2])), collapse = "\n"...
2013 Jan 02
0
sQuote() on zero-length inputs
It's not desperately important, but it would seem more consistent to me if sQuote(character(0)) or sQuote(NULL) returned character(0) rather than "??" . This could easily be achieved by putting if (length(x)==0) return(character(0)) at the beginning ... Ben Bolker
2008 Aug 20
1
Improvements to write.arff (PR#12574)
...ile <- file(file, "w") on.exit(close(file)) } if (!inherits(file, "connection")) stop("Argument 'file' must be a character string or connection.") if (!is.data.frame(x) && !is.matrix(x)) x <- data.frame(x) squote <- function(s) { ifelse(is.na(s), s, sprintf("'%s'", gsub("(['\\])", "\\\\\\1", s))) } text <- paste('@relation "', make.names(deparse(substitute(x))), '"', sep='') writeLines(text, f...
2012 Oct 20
1
R-2.15.1 CMD CHECK output: "Call Sequence"
...blem unique to me? cheers, Mark heres' a snippet from testing one of my packages under development: * checking for unstated dependencies in R code ... WARNING Error: package/namespace load failed for ?metaGSEA? Call sequence: 2: stop(gettextf("package/namespace load failed for %s", sQuote(package)), call. = FALSE, domain = NA) 1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose = FALSE) Execution halted See the information on DESCRIPTION files in the chapter ?Creating R packages? of the ?Writing R Extensions? manual. * checking S3 generic/method consistency...
2018 Sep 18
2
Suggested Patch: Adding commas to list of packages after R CMD check
...ils. ``` svn diff: Index: src/library/tools/R/QC.R =================================================================== --- src/library/tools/R/QC.R (revision 75322) +++ src/library/tools/R/QC.R (working copy) @@ -8536,13 +8536,13 @@ .pretty_format <- function(x) { - strwrap(paste(sQuote(x), collapse = " "), + strwrap(paste(sQuote(x), collapse = ", "), indent = 2L, exdent = 2L) } .pretty_format2 <- function(msg, x) { - xx <- strwrap(paste(sQuote(x), collapse = " "), exdent = 2L) + xx <- strwrap(paste(sQuote(x), colla...
2018 Mar 17
1
Inappropriate parens fix for Logic.Rd
Logic.Rd has been changed again in r74377. After change: ? \item{x, y}{raw or logical or \sQuote{number-like} vectors (i.e., of ? ? types \code{\link{double}} (class \code{\link{numeric}}, ? ? \code{\link{integer}}) and \code{\link{complex}}), or objects for It is still inappropriate. As I said before, integer is not double. Right: numeric includes double and integer Wrong: double includes...
2004 Jul 26
6
directing print.packageInfo to a file
...;wrong class") outFile <- if (is.null(file)) tempfile("RpackageInfo") else file outConn <- file(outFile, open = "w") vignetteMsg <- paste("Further information is available in the following ", "vignettes in directory ", sQuote(file.path(x$path, "doc")), ":", sep = "") headers <- c("", "Description:\n\n", "Index:\n\n", paste(paste(strwrap (vignetteMsg), collapse = "\n"), "\n\n", sep = "")) footers <-...
2009 Oct 22
1
Error in link in Rd file stops package installation
...opic? file <- utils:::index.search(parts$targetfile, pkgpath) - if (nzchar(file)) { + if (length(file)>0 && nzchar(file)) { warnRd(block, Rdfile, "file link ", sQuote(parts$targetfile), " in package ", sQuote(parts$pkg), A longer range fix would be to print more contextual information with the error messages from INSTALL. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com
2007 Mar 04
1
Problem using callNextMethod() in S4
...ect <- callNextMethod(); .Object; } )#initialize setValidity("baseClass", function(object) { print("---setValidity:baseClass---") strg <- object at myname; if (!(is(strg, "character") && nchar(strg) > 0)) { warning(paste(sQuote("myname"), "is missing")); }#if print(paste("myname = ",object at myname)) strg <- object at mydir; if (!(is(strg, "character") && file.exists(strg))) { warning(paste(sQuote("mydir"), "is not a system dire...
2007 Apr 06
2
regular expression
Dear R-List, I have a great many files in a directory and I would like to replace in every file the character " by the character ' and in the same time, I have to change ' by '' (i.e. the character ' twice and not the unique character ") when the character ' is embodied in "....." So, "....." becomes '.....' and
2011 Dec 16
0
Rd error message
...------------------ \name{backsolve} \alias{backsolve-methods} \title{Solve an Upper or Lower Triangular System} \alias{backsolve} \alias{backsolve,gchol-method} \alias{backsolve,gchol.bdsmatrix-method} \description{ Solves a system of linear equations where the coefficient matrix is upper (or \sQuote{right}, \sQuote{R}) or lower (\sQuote{left}, \sQuote{L}) triangular.\cr \code{x <- backsolve(R, b)} solves \eqn{R x = b}. } \usage{ backsolve(r, \dots) \S4method{backsolve}{gchol}(r, x, k=ncol(r), upper.tri=TRUE, \dots) \S4method{backsolve}{gchol.bdsmatrix}(r, x, k=ncol(r), upper.tr...
2015 May 09
1
PATCH: library(..., quietly=TRUE) still outputs "Loading required package: ..." (forgot to pass down 'quietly')
...attached) { if (!quietly) packageStartupMessage(gettextf("Loading required package: %s", pkg), domain = NA) library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc) || stop(gettextf("package %s could not be loaded", sQuote(pkg)), call. = FALSE, domain = NA) } It's from that library() call the message is generated. Here's a patch: $ svn diff src\library\base\R\library.R Index: src/library/base/R/library.R =================================================================== --- src/library/base/R/library.R...
2019 Jun 21
2
Suggested Patch: Library returns matching installed packages when typo present
...if(length(lib.loc) && !logical.return) { + allpkgs <- .packages(TRUE, lib.loc) + if (!is.na(w <- match(tolower(package), tolower(allpkgs)))) + warning(sprintf("Perhaps you meant %s ?", + sQuote(allpkgs[w])), call. = FALSE, domain = NA) stop(packageNotFoundError(package, lib.loc, sys.call())) + } txt <- if(length(lib.loc)) gettextf("there is no package called %s", sQuote(package)) else...
2005 Apr 11
4
R: function code
HI sorry to be a nuisance to all!!! how can i see the code of a particular function? e.g. nnet just as an example
2013 Oct 04
3
quote a column of a dataframe by its name
...example code X = matrix(rnorm(50),ncol = 5) X = data.frame(X) names(X)=c("x1","x2","x3","x4","x5") #pick the 4-th column X[,'x4'] #working X[,names(X)[4]] # not working , so how to modify this line? names(X)[4] # returns "x4" sQuote(names(X)[4]) # returns "'x4'" Best,
2014 Sep 10
1
install.packages misleads about package availability?
...2.R (working copy) @@ -46,12 +46,12 @@ p0 <- unique(pkgs) miss <- !p0 %in% row.names(available) if(sum(miss)) { - warning(sprintf(ngettext(sum(miss), - "package %s is not available (for %s)", - "packages %s are not available (for %s)"), - paste(sQuote(p0[miss]), collapse=", "), - sub(" *\\(.*","", R.version.string)), - domain = NA, call. = FALSE) + txt <- ngettext(sum(miss), "package %s is not available (for %s)", + "packages %s are not available (for...
2009 Nov 11
3
how to use # in a rd doc in url address
...make: \url{http://www.xxxx.org/myfolder/#myanchor} Of course, I suppose this will not work because # is a special character starting a comment line in the rd dialect. I did not found a similar example in "Writing R exentions". I am not sure bout using \dQuote{a quotation}), and use \sQuote and \dQuote correctly. Does anyone know how to get the thing right ? Patrick [[alternative HTML version deleted]]