similar to: Backslash in sub pattern?

Displaying 20 results from an estimated 10000 matches similar to: "Backslash in sub pattern?"

2008 Jun 13
4
Sweave: looping over mixed R/LaTeX code
Dear guRus, I would like to loop over a medium amount of Sweave code, including both R and LaTeX chunks. Is there any way to do so? As an illustration, can I create a .tex file like this using a loop within a .Rnw file, where the "1,2,3" comes from some iteration variable in R? ################################################ \documentclass{article} \usepackage{Sweave} \begin{document}
2009 Dec 07
3
Crash with Unicode and sub (PR#14114)
Full_Name: George Russell Version: 2.10.0 OS: Windows XP Version 2002 SP 2 Submission from: (NULL) (217.111.3.131) The following typed into R --vanilla induces a crash: -- cut here -- gctorture() u <- intToUtf8(c(rep(1e3,1e2),32,c(rep(1e3,1e2)))) v <- rep(u,1e2) v <- sub(" ","",v) v %in% "" -- cut here -- sessionInfo() says: -- cut here -- R version
2009 Sep 12
1
ggplot2: deterministic position_jitter & geom_line with position_jitter
Dear guRus, I am starting to work with the ggplot2 package and have two very dumb questions: 1) deterministic position_jitter - the jittering is stochastic; is there any way to get a deterministic jittering? For instance: example.data <- data.frame(group=c("foo","bar","foo","bar","foo","bar"),x=c(1,1,2,2,3,3),y=c(1,1,0,2,1,1))
2009 Aug 26
2
simple graph question: manipulating variable names
This is a simple problem that has stumped me: I'm trying to loop through a few dozen variable names in graphs. I've tried various approaches like this: attach(mydata) ivs <- c("oneiv", "anotheriv", "yetanotheriv") dvs <- c("onedv", "anotherdv", "yetanotherdv") for (iv in ivs) { for (dv in dvs) { graphname <- paste(iv,
2008 Jun 22
1
two newbie questions
# I've tried to make this easy to paste into R, though it's probably so simple you won't need to. # I have some data (there are many more variables, but this is a reasonable approximation of it) # here's a fabricated data frame that is similar in form to mine: my.df <- data.frame(replicate(10, round(rnorm(100, mean=3.5, sd=1)))) var.list <- c("dv1",
2009 Oct 13
2
Sweave output encoding in R-2.10.0beta on Windows (Rgui <-> Rterm)
Dear developers, I have come across a (somewhat strange) change in the encoding of Sweave output from R-2.9.2pat to R-2.10.0beta (apparently specific to Rgui) on Windows installations. Of course, the NEWS file contains quite a few changes concerning encoding, but I was not able to locate an entry which explains the observed behaviour. I am not very familiar with encodings/locales/codepages,
2007 Dec 11
2
the observed "log odds" in logistic regression
Dear list: After reading the following two links: http://luna.cas.usf.edu/~mbrannic/files/regression/Logistic.html http://www.tufts.edu/~gdallal/logistic.htm I've known the mathematical basis for logistic regression.However I am still not so sure about the "logit " For a categorical independent variable, It is easy to understand the procedures how "log
2009 Dec 29
1
problem reading from serial connection since 2.10.0
Dear list, I have a balance connected to the serial port of a windows machine ("COM1") and I read the text output of the balance with scan("COM1", what="character", sep="\n", n=1) after calling the previous line I press the print key on the balance which triggers sending one line of text to the serial connection and with R 2.9.2 I get something like Read
2009 Nov 16
3
R crash with intToUtf8 on huge vectors (PR#14068)
Full_Name: George Russell Version: 2.10.0 OS: Windows XP Professional Version 2002 Service Pack 2 Submission from: (NULL) (217.111.3.131) Typing the following command into R --vanilla causes R to crash: k <- intToUtf8(rep(1e3,1e7)) This is the output of sessionInfo(): R version 2.10.0 (2009-10-26) i386-pc-mingw32 locale: [1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
2009 Jan 30
1
Methods not loaded in R-Devel vs 2.8.1
Dear list-member, I am currently developing a package with S4 classes. The NAMESPACE and DESCRIPTION is printed below. Within this package I have set a method "residuals" for two classes. In version 2.8.1 these two are reported whereas in R-Devel (2009-01-28 r47766). What have I missed? What has changed and how can I rectify the issue? Your help and pointers are welcome. For 2.8.1:
2009 Dec 10
1
Antwort: Re: Crash with Unicode and sub (PR#14114)
I don't know about the technicalities, but Peter Dalgaard said the offending code also causes R to come to a stop using SUSE + WINE. Is it possible to run that lot on top of valgrind? Of course, it will probably take all day ... If not, I have a clue which might help. The problem seems to lie in the "sub" routine. In the original report I used -- cut here -- gctorture() u <-
2010 Feb 09
3
Confusing error message for [[.factor (PR#14209)
Full_Name: George Russell Version: 2.10.0 and 2.11.0 Under development (unstable) (2010-02-08 r51108) OS: Windows Submission from: (NULL) (217.111.3.131) > c("a","b")[[c(TRUE,FALSE)]] Error in `[[.default`(factor(c("a", "b")), c(TRUE, FALSE)) : recursive indexing failed at level 1 I find this error message confusing, though after reading the HELP
2011 Mar 10
1
Help writing a Scheffe Contrast function for R
Hello, As a new user of R (less than a month) I have got my hands on several books and am pouting through the net looking for help in gaining understanding of this powerful tool. I am becoming more proficient with using basic functions to conduct basic statistics. I am now looking to learn how to write code. After a few small worthless functions I decided to try to create a function that was
2006 Oct 27
2
all.names() and all.vars(): sorting order of functions' return vector
Dear list-subscriber, in the process of writing a general code snippet to extract coefficients in an expression (in the example below: 0.5 and -0.7), I stumbled over the following peculiar (at least peculiar to me:-) ) sorting behaviour of the function all.names(): > expr1 <- expression(x3 = 0.5 * x1 - 0.7 * x2) > all.names(expr1) [1] "-" "*" "x1"
2011 Jul 01
1
Poisson GLM with a logged dependent variable...just asking for trouble?
Dear R-helpers, I'm using a GLM with poisson errors to model integer count data as a function of one non-integer covariate. The model formula is: log(DV) ~ glm(log(IV,10),family=poisson). I'm getting a warning because the logged DV is no longer an integer. I have three questions: 1) Can I ignore the warning, or is logging the DV (resulting in non-integers) a serious violation of the
2011 Apr 21
3
R CMD Sweave versus Sweave() on Windows
Dear list subscriber, I am quite puzzled by the behaviour of processing Sweave files within an R session, i.e. Sweave("foo.Rnw") versus R CMD Sweave foo.Rnw In the former the environmental variable 'SWEAVE_STYLEPATH_DEFAULT = TRUE' is obeyed (this is set in etc/Renviron.site as well as under the users home directory in .Renviron). That is the hard-coded path to Sweave.sty is
2007 May 01
1
integer constants given by hexadecimal notation
Hi, > 0x10L returns: int 0 I would expect: int 16? This happens with all integer constants given by hexadecimal notation. It's a bug? > sessionInfo() R version 2.5.0 (2007-04-23) i386-pc-mingw32 locale: LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252 attached base packages: [1] "stats"
2008 May 09
1
comparison (PR#11421)
In R-2.7.0 release as well as patched (from yesterday) under Windows XP, R crashes when typing, e.g.: repeat{ rep(1, 10000) == "?" } Note that I cannot reproduce the error in R-2.6.2 nor R-devel. Uwe Ligges --please do not edit the information below-- Version: platform = i386-pc-mingw32 arch = i386 os = mingw32 system = i386, mingw32 status = major = 2 minor =
2009 Jan 27
1
small bug in base::formatC (PR#13474)
Full_Name: Bernd Bischl Version: 2.8.1 OS: Windows XP Professional Submission from: (NULL) (129.217.207.95) Hi, there seems to be a small bug in formatC: formatC("foo", format="s", mode="charcacter") Error in formatC("foo", format = "s", mode = "charcacter") : 'mode' must be "double" ("real") or
2011 Mar 21
1
error in: testing if installed package can be loaded
hi, I am preparing my package for R 2.13 build and check gives no warnings just OK's However when running R CMD INSTALL it gives me (nfortunately it is in german) ** help *** installing help indices ** building package indices ... ** testing if installed package can be loaded Fehler: '\U' ohne Hex-Ziffern in der Zeichenkette beginnend mit "C:\U" genutzt Ausführung