search for: shquot

Displaying 20 results from an estimated 80 matches for "shquot".

Did you mean: shquote
2008 Jul 23
2
shQuote and cat
Dear R-users, It is my understanding that cat(shQuote(a.string)) should print the origintal a.string. Is this right? I am not sure cat() correctly prints strings which are generated by triple-shQuote(): > shQuote(shQuote("a")) [1] "\"\\\"a\\\"\"" > cat(shQuote(shQuote(shQuote("a"))), '\n...
2008 Jul 23
2
shQuote and cat
Dear R-users, It is my understanding that cat(shQuote(a.string)) should print the origintal a.string. Is this right? I am not sure cat() correctly prints strings which are generated by triple-shQuote(): > shQuote(shQuote("a")) [1] "\"\\\"a\\\"\"" > cat(shQuote(shQuote(shQuote("a"))), '\n...
2008 Dec 17
1
using dvi with latex object: directory not correctly set, maybe due to error in shQuote()
...; dvi(latex.obj) warning: extra args ignored after 'cd' H:\PROJECTS\data warning: extra args ignored after 'yap' When I have a look at the function dvi.latex I find the following line which, I guess, is meant to set the new directory and to run latex. sys(paste("cd", shQuote(tempdir()), sc, optionsCmds("latex"), "-interaction=scrollmode", shQuote(tmp)), output = FALSE) Running just the piece shQuote(tempdir()) returns > shQuote(tempdir()) [1] "\"C:\\DOKUME~1\\ferimawi\\LOKALE~1\\Temp\\Rtmpr4CG3A\"" > tempdir() [1...
2011 Nov 15
2
Problem creating reference manuals from latex
R Community, I often am in need of viewing the reference manuals of packages and do not have Internet access. I have used the code: path <- find.package('tm') system(paste(shQuote(file.path(R.home("bin"), "R")),"CMD", "Rd2pdf",shQuote(path))) someone kindly provided from this help list to generate the manuals from the latex files. This worked well with version R 2.13. After the upgrade to R 2.14 I use this code (see below and get...
2007 Apr 20
4
importing sas datasets
Hello, I wanted to ask help about importing sas datasets. 1)I tried with some functions as read.ssd (foreign package), but it doesn't import the file if the length of the variables' names are longer than 8 bite (it has to conform to the 6 version). 2)I then tried with the sas.get function (Hmisc package) but with the command: c<- sas.get(lib="c:\\ghan",
2019 Feb 28
2
Exit status of Rscript
Current R release (3.5.2) and devel return a 0 exit status on error, while prior versions returned a non-zero exit status. On Linux and MacOs, the following line returns TRUE for R-3.5.2 and R-devel, and FALSE for R-3.5.1 and R-3.5.0: system2("Rscript", c("-e", shQuote("stop('foo')"))) == 0 I didn't find this in the NEWS, so I believe this is a bug. Best, Michel
2019 Dec 15
1
system2 doesn't quote stdin on unix, unlike stdout, stderr & input and on Windows
Hi again! While investigating the bug report [*] I found out that on unix, system2 does not quote its `stdin` argument while preparing the command line to launch. It does shQuote the `stdout` and `stderr` arguments, and also the `f <- tmpfile()` variable (which is used if `input` argument is provided), which seems to set a precedent. On Windows, stdin, stdout, and stderr are handled independently of the shell, so it also just works without the use of shQuote by the call...
2004 Dec 29
3
Windows vignettes, shQuote, texi2dvi
I noticed a shQuote fix for Windows in the svn logs. Just wanted to point out that this will favorably affect texi2dvi on Windows which previously used UNIX quoting and so generated an incorrect Windows command. (Note that texi2dvi is used when creating vignettes.) Another problem is that the recommended tex distr...
2008 Nov 03
1
dev2bitmap: extra missing
Hi, I don't know if I am the first one to report the problem: in 2.8.0 dev2bitmap gained aa support, but "extra" is null if neither taa nor naa is specified. > dev2bitmap("plot.pdf",type="pdfwrite") Error in paste(shQuote(gsexe), " -dNOPAUSE -dBATCH -q -sDEVICE=", type, : object "extra" not found > dev2bitmap("plot.pdf",type="pdfwrite",taa=4) > I guess a useful default for extra is missing: if (!is.na(taa)) extra <- paste(" -dTextAlphaBits=&quo...
2006 Dec 11
3
Problem with sas.get function in Hmisc
Thomas, As F Harrel in a preceding message told me that you are the maintainer of Hmisc package, I write directly to you, with copy to the Rhelp list in case someone encountered the same problem and find some benefit in the response. I used quite often the function sas.get in Hmisc library which I is very, very useful. But, as trying to reuse it today it seems not to function anymore. I tried
2004 Dec 09
2
system() and file names with spaces
Consider the question we had recently: "how do I count the lines in a file without reading it into R?" The solution I suggested was as.numeric(system(paste("wc -l <", filename), TRUE)) Unfortunately, it doesn't work, or at least, not all the time. If you already know all about that, and don't care, or already have a solution, stop reading now. Otherwise, let
2015 Nov 06
2
corrupt PACKAGES.gz?
...pkgs.gz <- paste(sep="/", repos, "bin/windows/contrib", v, "PACKAGES.gz") tfile <- tempfile(fileext=".gz") download.file(pkgs.gz, dest=tfile) r.gz <- readLines(gzfile(tfile, "r")) tail(system(paste("c:\\cygwin\\bin\\gzip -d - ", shQuote(tfile)), intern=TRUE)) and got > repos <- "https://cran.rstudio.com" > v <- "3.2" > pkgs.gz <- paste(sep="/", repos, "bin/windows/contrib", v, "PACKAGES.gz") > > tfile <- tempfile(fileext=".gz") > download....
2006 Jan 05
1
defining a print method
.... If I invoke it with print then it prints as expected but if we just type xx at the R prompt then we get nothing back. How do we define the print method so that it works in the latter case too? > xx <- structure("abc", class = "xx") > print.xx <- function(x, ...) shQuote(x) > print(xx) # ok [1] "\"abc\"" > xx # no output ???? > > sessionInfo() R version 2.2.1, 2005-12-20, i386-pc-mingw32 attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils" "da...
2010 May 05
1
testInstalledBasic question
...nning tests of random deviate generation -- fails occasionally running code in ?p-r-random-tests.R? comparing ?p-r-random-tests.Rout? to ?p-r-random-tests.Rout.save? ...running tests of primitives running code in ?primitives.R? FAILED Warning messages: 1: In system(paste("diff -bw", shQuote(a), shQuote(b))) : diff not found 2: In system(paste("diff -bw", shQuote(a), shQuote(b))) : diff not found In the tests directory, in primitives.rout.fail I see the following: > ## check that they do argument matching, or at least check names > except <- c("call"...
2007 Apr 10
3
sas.get problem
I have 3 SAS files all in the directory F:/sas, two data files and a format file : form.ea1.sas7bdat form.ea2.sas7bdat sas.fmts.sas7bdat F is a USB. I am trying import them to R using "sas.get". I have not used SAS since I was downloading data from mainframe and having to write JCL. I had forgotten how bizarre SAS can be. I currently have not even figured out how to load the files
2008 Nov 14
1
Bug#505698: r-base-core: dev2bitmap fails with gsexe related error (PR#13288)
...ovember 2008 at 14:35, Stefano Costa wrote: | Package: r-base-core | Version: 2.8.0-1 | Severity: normal | | As in subject. The bug is reproducible on my machine with these | commands: | | > x <- rnorm(100) | > plot(density(x)) | > dev2bitmap("density.png") | Error in paste(shQuote(gsexe), " -dNOPAUSE -dBATCH -q -sDEVICE=", type, | : | object "extra" not found | > Confirmed. The code in looks a little off inasmuch as in if (!is.na(taa)) extra <- paste(" -dTextAlphaBits=", taa, sep = "") if (!is.na(g...
2011 Nov 08
1
Rd2pdf error after 2.14 upgrade‏
...n future releases (since this allows the use of fonts only > #supported for PDF), and only R CMD Rd2pdf will be available. > > The way I used to open a package's pdf manual from latex file was as > follows: (path <- find.package('plyr')) system(paste(shQuote(file.path(R.home("bin"), "R")),"CMD", "Rd2pdf",shQuote(path))) > After version 2.14 R the same code now throws up the error: > > Hmm ... looks like a package > Converting parsed Rd's to LaTeX ........ > Creating...
2008 Apr 24
1
system() function
...rror: ARGUMENT 'CMD INSTALL -l D:/R/JMB.LIBS jmb.test' __ignored__ Fatal error: you must specify '--save', '--no-save' or '--vanilla' My function contains these 3 lines: setwd("D:/R/R.pkgs") # path to files set using package.skeleton() commands <- shQuote("CMD INSTALL -l D:/R/JMB.LIBS jmb.test") system(paste('"R"',commands)) Can anyone tell me where I have gone astray? I suspect the problem lies in quoting the strings. The command (R CMD INSTALL etc.) runs OK if I run it in a windows shell. Thank you. Jeff Breiwick
2007 Apr 27
0
Fwd: RE: importing sas datasets
...rary="d:\\R\\R-2.4.1", > > sasprog='"C:\\Programmi\\SAS\\SAS 9.1\\sas.exe"') (also > > trying with sasprog="C:\\Programmi\\SAS\\SAS > > 9.1\\sas.exe") > > the log signaled the following error: > > > > Errore in system(paste(shQuote(sasprog), shQuote(sasin), > > "-log", shQuote(log.file)), : > > unused argument(s) (output = FALSE) > > The error says there are unused arguments in the system > function call. So that's where I would focus to try to > solve this problem. However,...
2011 Mar 23
0
Passing tex parameter via texi2dvi
I am trying to pass a additional argument to texi2dvi, for example to use the aux-directory. Looks like this is not possible via options: options(texi2dvi='texi2dvi --tex-option="-aux-directory=auxdir"') texi2dvi(file = "GBPL3.tex", pdf = TRUE) #Error in system(paste(shQuote(texi2dvi), "--version"), intern = TRUE) : # '"texi2dvi --tex-option=\"-aux-directory=auxdir\""' not found Because --version come in the way, and extra is there, but not really used. extra <- "" #### ??? --version does not like tex-option...