similar to: gsub, backslash and xtable

Displaying 20 results from an estimated 1000 matches similar to: "gsub, backslash and xtable"

2013 Sep 13
2
xtable use plus minus
I am using a similar dataset to the following: a= c("Fruits", "Adam","errorA", "steve", "errorS", "apples", 17.1,2.22, 3.2,1.1, "oranges", 3.1,2.55, 18.1,3.2 ) a_table=data.matrix(t(matrix(a,nrow=5))) I would like to plus minus every second column starting from errorA (using xtable/ hmisc) example output (ignoring
2013 Sep 10
0
xtable Highlight the lowest and plus minus
I am using a similar dataset to the following: a= c("Fruits", "Adam","errorA", "steve", "errorS", "apples", 17.1,2.22, 3.2,1.1, "oranges", 3.1,2.55, 18.1,3.2 ) a_table=data.matrix(t(matrix(a,nrow=5))) I would like to highlight the smallest value in the Adam and Steve columns and, also plus and minus the errors
2007 Sep 13
1
chartr better
For example, the following changes are necessary when i convert a Japanese hiragana into katakana in chattr. R code: > chartr("\u3041-\u3093","\u30a1-\u30f3","\u3084\u3063\u305f\u30fc") --- R-alpha.orig/src/main/character.c 2007-09-05 07:13:27.000000000 +0900 +++ R-alpha/src/main/character.c 2007-09-13 16:10:21.000000000 +0900 @@ -2041,6 +2041,16 @@
2002 Nov 20
3
survival analysis
Has anybody written an actuarial (life) survival procedure, this does not appear to be an option in the survival package? This approach is common in orthopaedic surgery to demonstrate the survival of prostheses. I need to apply the "modified" lower conf.int because of the censoring over time. I want a life table which I can then easily plot. Many thanks
2003 Jul 31
1
Mac OS 10 (not X11) failure to rotate symbols (PR#3602)
In the following code the arrow symbols do not rotate with the text on the Mac OS window, however the do rotate on X11 port on Mac OS. (R version 1.71) x <- c(0,10.) y <- c(0,10.) offset <- 3 centre <- 5 plot(x,y, xlim=range(x), ylim=range(y),type="n", xlab="",ylab="", main="",xaxt="n",yaxt="n") for (i in (seq(0, 340,
2006 Apr 24
3
gsub + backslashes
Dear developeRs, I thought that backslashes can be escaped in the usual way (and I think I did this before) but I can't see why R> gsub("\\", "x", "\alpha") Error in gsub(pattern, replacement, x, ignore.case, extended, fixed, useBytes) : invalid regular expression '\' gives an error. Or am I just blind? Best, Torsten R> version
2002 Jan 19
2
comma as decimal separator in plots
Hi, Some time ago I asked about how to use comma as decimal separator in plots and Mr. Paul Murrell wrote: ------- You could try something with axis() and chartr(), like ... par(mfrow=c(2,1)) plot(1:10/11, rep(1, 10), main="Standard X-Axis") plot(1:10/11, rep(1, 10), main="Customised X-Axis", axes=F) axis(1, at=pretty(1:10/11),
2012 Mar 07
1
gsub: replacing double backslashes with single backslash
Hello everybody, this might be a trivial question, but I have been unable to find this using Google. I am trying to replace double backslashes with single backslashes using gsub. There seems to be some unexpected behaviour with regards to the replacement string "\\". The following example uses the string C:\\ which should be converted to C:\ . > gsub("\\\\",
2011 Apr 29
1
regular expression in gsub() for strings with leading backslash
Hello, Can anyone help on gsub() in R? I have a string like something below, and wanted to delete all the strings with leading backslash, including "\xa0On", "\023, "\xab", and many others. How should I write a regular expression pattern in gsub()? I don't care how many characters following backslash. txt <- "Is This Thing\xa0On? http://bit.ly/jAbKem
2020 Feb 03
2
Error de caracteres al ejecutar un script en Windows
Buenas tardes, Tengo un problema al ejecutar un script de R desde la consola de Windows 8.1. El código desde RStudio funciona perfectamente, pero al ejecutarlo desde la consola peta al hacer una cambio de caracteres. El error que da en la consola es: Error in chartr("áéíóúà èìòùâêîôû", "aeiouaeiouaeiou", xpeliculas) : 'old' es más largo que
2007 Jan 23
0
Questions about xtable and print.xtable
I have been using the wonderful xtable package lately, in combination with Sweave, and I have a couple of general questions along with a more particular one. I'll start with the particular question. I basically have a 1x3 array with column names but no row names. I want to create a latex table with column setting set to "|rrr|". I want the column names to appear, but the
2003 Aug 12
3
grep and gsub on backslash and quotes
The following code works, to gsub single quotes to double quotes: line <- gsub("'", '"', line) (that's a single quote within doubles then a double within singles if your viewer's font is not good). But The R Language Manual tells me that Quotes and other special characters within strings are specified using escape sequences: \' single quote \"
2012 Dec 18
1
xtable with psych objects
Hello: I s there a way to use xtable with objects from the psych package, particularly principal()? Is there a difference between princomp and principal? xtable seems to play better with princomp. Thank you. Yours, Simon Kiss ********************************* Simon J. Kiss, PhD Assistant Professor, Wilfrid Laurier University 73 George Street Brantford, Ontario, Canada N3T 2C9
2009 Jul 29
2
xtable formatting: RED for negative numbers?
I've been experimenting recently with the fantastic Sweave/xtable combination for generating latex. In the xtable vignette, I found this great example of printing a ts object by months. Is there a way to modify this code to generate RED numbers inside xtable for negative results in x.ts? Thanks in advance. - Ken # Sweave/xtable snippet below
2005 Aug 30
2
xtable
I have installed package xtable with su -c 'R CMD INSTALL xtable' and got this promising feedback: * Installing *source* package 'xtable' ... ** R ** data ** help >>> Building/Updating help pages for package 'xtable' Formats: text html latex example * DONE (xtable) Despite that, R returns: Error: couldn't find function "print.xtable"
2009 Jul 29
1
xtable formatting: RED for negative numbers?
I've been experimenting recently with the fantastic Sweave/xtable combination for generating latex. In the xtable vignette, I found this great example of printing a ts object by months. Is there a way to modify this code to generate RED numbers inside xtable for negative results in x.ts? Thanks in advance. - Ken # Sweave/xtable snippet below
2009 May 26
2
Using package "exams" and xtable
Hello, I am trying to use the package "exams" to construct problem sets. I have constructed an exercise which generates a list of integers and asks the student to compute the median. rx is the vector of n numbers >str(rx) num [1:16] 21 9 8 18 4 12 17 2 9 7 ... I want to print out the entire vector as part of the problem. When I use \Sexpr(rx) only the first value (in this case
2007 Aug 09
1
Need Help: Installing/Using xtable package
Hi all, Let me know if I need to ask this question of the bioconductor group. I used the bioconductor utility to install this package and also the CRAN package.install function. My computer crashed a week ago. Today I reinstalled all my bioconductor/R packages. One of my scripts is giving me the following error: in my script I set: library("xtable") print.xtable(.... and receive this
2013 Feb 17
1
xtable nlme
Hola a todos Les consulto por un problema con xtable y nlme, tomando un ejemplo del manual de nlme para obtener los resultados en latex utilizando xtable, se puede utilizar el siguiente código, pero hay un problema y causa error. library(nlme) library(xtable) fm1 <- nlme(height ~ SSasymp(age, Asym, R0, lrc), data = Loblolly, fixed = Asym + R0 + lrc ~ 1,
2010 Jul 15
1
Backslash \ in string
Dear R community, is there any way to include a backslash in a charakter string without meaning some escape sequence? E.g. i need a string like: a <- '\hline' Error: '\h' is an unrecognized escape in character string starting "\h" to include some latex code in a xtable object, but I only mange to do: a <- '\\hline' which is not what I want. In