similar to: Sweave - print \n ?

Displaying 20 results from an estimated 1000 matches similar to: "Sweave - print \n ?"

2008 May 01
2
howto import .xls and .ods
Hi, i want to import data from .ods and .xls files in R on a linux system. Seems it was a faq in the past, but i found only solutions for Windows. Is there a handy solution for linux? The best would be something like mytab <-read.ods(...) Any hints? Thanks a lot for reading so far, -- Jonas Stein <news at jonasstein.de>
2006 Dec 22
1
odfWeave problem
Hi, I'm trying to customize some formating for a table using odfWeave. I'm having some trouble getting the formatting to work. I've defined the following format defns: origStyleDefs <- getStyleDefs() StyleDefs=origStyleDefs StyleDefs$ArialLeftBold$parentStyleName='' StyleDefs$ArialLeftBold$type='Paragraph' StyleDefs$ArialLeftBold$textAlign='left'
2006 Dec 27
3
how to transform string to variable name in a fuction?
there is a data frame, like this: > df aa bb 1 a 20.27802 2 b 22.10664 3 c 21.33470 4 a 22.32898 5 b 19.73760 6 c 20.38979 .....(suppressed) what I want to do is to copy the data frame's rows into different data frames according to the levels of 'aa' column, > df.a <- df[df[,1]=='a',] ; df.b <- df[df[,1]=='b',] ; ....
2006 Dec 23
1
bug in odfWeave
Hi, I think there is a minor bug in odfWeave. In the function odfStyleGen, the following line has an extra "=": if(length(grep("italic", thisStyle$fontType))) fontText <- c(fontText, tagattr("fo:font-style=", "italic")) This is creating an error if some text needs to be formatted as italic, since the corresponding entry in
2011 Oct 28
1
xtable with \begin{tabular} and only.contents
I have found that I like having my captions and labels in my latex document rather than having them contained in my xtable output file (I haven't fully gone to sweave yet). I know I can do something like this by using the 'only.contents' argument in xtable. Unfortunately, the only.contents argument also removes the \begin{tabular}{rrrrrr} & \end{tabular} (in the example below) of
2015 Nov 25
2
stargazer
Estimados Instale MiKTeX 2,9 y Texmaker y se mantiene el problema. Apreciaría la ayuda de los conocedores Saludos Cuando quiero hacer una tabla con el paquete stargazer, esto es lo que sale stargazer(attitude) % Table created by stargazer v.5.2 by Marek Hlavac, Harvard University. E-mail: hlavac at fas.harvard.edu % Date and time: lu., nov. 16, 2015 - 10:55:58 \begin{table}[!htbp]
2010 Nov 22
1
Problem setting the number of digits in xtable
DEar list members, I am currently using Sweave with LaTeX which is great. I can use xtable for formatting outp of tables but I have a problem setting the number of decimals in xtables when used with dataframe. I have found an example on the net ith matrix and it works. For example this works : > > tmp <- matrix(rnorm(9), 3, 3) > > xtmp <- xtable(tmp) > > digits(xtmp)
2008 Sep 24
1
paste in xtable
Dear R help: I am trying to use paste(), within an ifelse() statement to insert latex commands into an object that has been created using xtable(). I cannot make the strings behave as I would like, the '\t' is creating a tab, the usual method of '\\t' is not working either - nor is any series of backslashes. The xtable object, I think, automatically alters the strings. How
1999 Mar 20
1
How to get '\h' through print() or paste()?
Hello, [really hoping not to ask something the 1001th time] I need single backslashes printed for generating TeX-code. That works: > print("\begin{tabular}") [1] "\begin{tabular}" But \h seems to be interprated in some way: > print('\hline') [1] "hline" Hm, trying to mask the backslash: > print('\\hline') [1]
2007 Jun 20
2
"xtable" results doesn't correspond to data.frame
Dear useRs, Am trying to use xtable on the following data.frame and I don't get what I expect: example.table <- data.frame(rbind( c("Gender"," "," "," "), cbind(rep(" ",2),c("Male","Female"),c(3.0,4.0),c(3/7,4/7)) )) colnames(example.table) <- c(" "," ","number of
2009 Jan 26
1
Sweave'ing Danish characters
Hi, I am writing an Sweave document and am using 'xtable' to make frequency tables of diagnoses of people undergoing cholecystectomy. Some of these diagnoses contain Danish characters ("?", "?", and "?"), and these characters are all garbled in the Latex document after I run Sweave. The odd thing is, everything looks absolutely right in the R console, and if
2011 Aug 17
1
Symbol Font Baseline, Cairo, Card Symbols
I think I found a bug in the Cairo library, plus weird behavior in both the Cairo and the normal pdf device. The baseline of the spades symbol seems to be off. This is easier to show than it is to explain. The problem does not appear in the normal pdf device, which is why I am guessing this is a Cairo bug. moreover, I cannot figure out why three of the card symbols seem to be transparent, but
2015 Nov 16
2
stargazer
Estimados Cuando quiero hacer una tabla con el paquete stargazer, esto es lo que me sale, probablemente tengo que instalar algun programa sessionInfo() R version 3.2.2 (2015-08-14) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 8 x64 (build 9200) locale: [1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252 [3] LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C [5]
2013 Mar 15
2
latex(test, collabel=) returns wrong latex code?
Hello: I'm working with a 2-dimensional table that looks sort of like test below. I'm trying to produce latex code that will add dimension names for both the rows and the columns. In using the following code, latex chokes when I include collabel='Vote' but it's fine without it. The code below prouces the latex code further below. I'm confused by this, because it looks
2013 May 24
2
xtable() with booktabs option problem
I could have sworn that yesterday xtable(file, booktabs = TRUE) was giving me toprule , midrule and bottomrule outout. Today : library(xtable) aa <- table( sample(letters[1:9], 100, replace = TRUE)) xtable(aa, booktabs = TRUE) gives me \begin{table}[ht] \centering \begin{tabular}{rr} \hline & V1 \\ \hline a & 15 \\ b & 11 \\ c & 13 \\ d &
2007 Sep 13
1
Problem using xtable on an array
Hi all I know about producing a minimal example to show my problem. But I'm having trouble producing a minimal example that displays this behaviour, so please bear with me to begin with. Observe: I create an array called model.mat. Some details on this: > str(model.mat) num [1:18, 1:4] -0.170 -0.304 -2.617 2.025 -1.610 ... - attr(*, "dimnames")=List of 2 ..$ : chr
2008 Jul 04
1
Hmisc latex: table column width
R users, I'm trying to set a column width to one of the columns in a latex table (using Hsmic package, latex function). My intention is to get \begin{tabular}{lp{1.2in}llllll}\hline\hline Here's an example ####### R code ######### DF <- data.frame(Titanic) DF$long <- paste("This is a veeeeeeeeeeryyyyyyyyyy long line") DF <- DF[, names(DF)[c(6,1:5)]] library(Hmisc)
2008 Mar 11
2
R-Latex question
Hi, maybe my question is not typical. I want to make R table-kind output to be readable immediately in Latex but I am struggling with symbol '\' needed for instance in '\hline'. For example when 'Table' is a matrix class object: cat("&",Table[1,1], "&",Table[1,2], "\n");flush.console() cat("\hline \n");flush.console()
2005 Aug 30
1
Convert ftable to latex?
Dear list, I cannot make the latex command to output a ftable objet the way I want it. Is it posible? I found a post in the archives saying that one should use the rgroup and n.rgroup arguments to supply the row names, but so far I have been unsuccessful. This is what I have: >
2011 Jun 01
1
xtable with conditional formatting using \textcolor
Hello list, I'm doing a table with scores and I want include colors to represent status of an individual. I'm using sweave <<results=tex>>= and xtable but I can't get a result I want. My attemps are #----------------------------------------------------------------------------- # code R da <- data.frame(id=letters[1:5], score=1:5*2) col <- function(x){