similar to: How do Sweave users collaborate with Word users?

Displaying 20 results from an estimated 10000 matches similar to: "How do Sweave users collaborate with Word users?"

2012 Aug 21
2
Sweave: R chunk inside caption?
Hi Folks, I'm surprised, but I didn't find this question addressed anywhere. I'd like to generate a LaTeX caption with R code. I've tried the code below, but I get the following TeX error: ! Argument of \@caption has an extra }. <inserted text> \par l.21 } Any thoughts? Perhaps I'll have to write the "\caption{}" text with R? thanks!
2012 May 21
2
sweave tables as images?
Hello folks, I've been on a journey trying to figure out how to manage documents that are amenable to sharing and editing, but that contain dynamic content generated by R. I've come to the following solution: I use Sweave to generate labeled png & pdf figures, and I "Insert & Link" those figures as "Pictures" in a Word 2010 doc. Thus, when data or code
2012 Apr 04
3
Rgui maintains open file handles after Sweave error
Hello Folks, When I run the document below through sweave, rgui.exe/rsession.exe leaves a file handle open to the sweave-001.pdf graphic (as verified by process explorer). Pdflatex.exe then crashes (with a Permission Denied error) because the graphic file is locked. This only seems to happen when there is an error in the sweave document. When there are no errors, no file handles are left open.
2011 Jun 05
3
reproduction archives
Hello Folks, As some of my old code broke when an updated package changed its interface, I started thinking about reproduction of analyses. It's not good enough to save our code - we have to save the package versions those analyses used as well as the R-core. I saw a couple references to "reproduction archives" around, but nothing specific. Is there any good way to package up
2012 Mar 25
2
avoiding for loops
I have data that looks like this: > df1 group id 1 red A 2 red B 3 red C 4 blue D 5 blue E 6 blue F I want a list of the groups containing vectors with the ids. I am avoiding subset(), as it is only recommended for interactive use. Here's what I have so far: df1 <- data.frame(group=c("red", "red", "red", "blue",
2012 Nov 07
3
extract indep vars from formula
Hello, I'm trying to extract the independent variables from a formula. The closest I've been able to come, aside from rolling my own, is the following: > a = y ~ b * x > attr(terms(formula(a)),"variables") The reason I'm doing this is that I'm building a grid of points that I use to construct a 3-d model prediction surface in rgl. If there are more than two
2013 Apr 02
2
exporting tables to word
Hello all, What is your preferred method to export tables (from ftable()) to Word? Do you just export to a text file and then copy/paste? Or perhaps via HTML output? Thanks, Allie
2013 Mar 20
3
summarize dataframe based on multiple cols, not their combinations
Hi folks, I'm trying to figure out how to get summarized data based on multiple columns. However, instead of giving summaries for every combination of categorical columns, I want it for each value of each categorical column regardless of the other columns. I could do this with three different commands, but i'm wondering if there's a more elegant way that I'm missing. Thanks!
2012 Nov 02
2
backreferences in gregexpr
Hi Folks, I'm trying to extract just the backreferences from a regex. > temp = "abcd1234abcd1234" > regmatches(temp, gregexpr("(?:abcd)(1234)", temp)) [[1]] [1] "abcd1234" "abcd1234" What I would like is: [1] "1234" "1234" Note: I know I can just match 1234 here, but the actual example is complicated enough that I have to
2013 Sep 02
1
Sweave: printing an underscore in the output from an R command
I am working with Sweave and would like to print out into my latex document the result of the R command version$platform So what I first tried in my .Rnw document was \Sexpr{print(version$platform)}. However, the output from this command is the string "x86_64-apple-darwin10.8.0" (without the quotes). This contains an underscore, which is a special character in tex and so I get an error
2011 Jun 22
2
strange date problem - May 3, 1992 is NA
> is.na(strptime("5/2/1992", format="%m/%d/%Y")) [1] FALSE > is.na(strptime("5/3/1992", format="%m/%d/%Y")) [1] TRUE Any idea what's going on with this? Running strptime against all dates from around 1946, only 5/3/1992 was converted as "NA". Even stranger, it still seems to have a value associated with it (even though is.na thinks
2012 May 02
1
rgl.Sweave not producing transparency in pdf plots with alpha
Hi Folks, I'm trying to get rgl.Sweave to produce plots with transparency. However, it just seems to produce opaque plots when pdf is the output type. Perhaps this is a known issue? I'll just use .png in the meantime, but wanted to see about this, as I didn't see it in the documentation (though it's possible I missed it). Thanks, Allie \documentclass{article} \title {rgl
2012 Sep 20
2
Sweave - if \Sexpr{} than \SweaveInput{"my.Rnw"}
Depending on an R computation I would like to include an Sweave documents in the main Sweave document. How can I do it? So I was thinking .... to use Latex features : \newif\ifpaper \ifpaper \SweaveInput{"my1.Rnw"} \else \SweaveInput{"my2.Rnw"} \fi But how do I set paper to true or false given an \Sexpr ?? \papertrue % or \paperfalse Any ideas? cheers -- Witold
2016 Jun 02
3
Ayuda con R Sweave
Gracias por las respuestas La verdad es qeu estoy trabjando con Rstudio + Knitr, lo unico que en R studio le doy a crear nuevo Sweave, pero is me carga la libreria knitr. Solucioné el problema que os comenté, era por un fallo tonto, a la hora de poner datos$A, puse dats$A, es decir, le faltaba la o.... Ahora una duda que no se como resolver es la de los gráficos. No consigo reducir su tamaño...
2012 Apr 02
2
summaryBy: transformed variable on RHS of formula?
Hi Folks, I'm trying to cut my data inside the summaryBy function. Perhaps formulas don't work that way? I'd like to avoid adding another column if possible, but if I have to, I have to. Any ideas? Thanks, Allie require(doBy) df = dataframe(a <- rnorm(100), b <-rnorm(100)) summaryBy(a ~ cut(b,c(-100,-1,1,100)), data=df) # preferred solution, but it throws an
2012 May 04
2
[Sweave] string.prefix without hyphen-minus
Dear Sweave users, Could you help me to find a way to place Sweave output files in a subdirectory of the currentfolder without giving them a subname? If the option "prefix.string=foo/" is used, all files are placed in this folder, but begin with an hyphen-minus, which makes it difficult to work with them. If the option "prefix=FALSE" is used, then files won't be placed in
2012 May 09
1
Sweave, beamer and alert within code chunks
Hi all, Using Beamer, in order to highlight a piece of R code I do something like this - note the "\structure" and "\alert" commands: \begin{semiverbatim} > mleOut <- \structure{dlmMLE}(Nile, + parm = c(0.2, 120), # initial values for optimizer + lower = c(1e-7, 0)) \alert<2>{# V must be positive} > mleOut$convergence
2010 Nov 17
3
translate vector of numbers to indicies of 0/1 matrix
Hello All, Searched around, haven't found a decent solution. I'd like to translate a vector of numbers to a matrix (or to a list of vectors) such that the vector values would serve as indicies of the 1's in an otherwise-zero-filled matrix (or list of vectors). For example: > a = c(1,3,3,4) # perform operation [,1] [,2] [,3] [,4] [1,] 1 0 0 0 [2,] 0 0 1
2012 Feb 20
2
Computing plot size in Sweave
Sometimes you want to compute the physical size of a plot based on data. In R itself this is no problem. But is there a way to compute the values of height and width in S-weave, say: <<graph,fig=TRUE,height=xx,width=yy>>= where xx and yy are computed and not physically written in the document? Bendix ______________________________________________ Bendix Carstensen Senior
2012 Nov 29
2
googleVis plot and knitr/sweave
Dear R users. I'm currently making a report with knitr (RStudio) where I would like to plot a googleVis map. However, the map generated is an HTML file which I don't know how to integrate it in my report. So my question is how to include a map generated with googleVis in a PDF created with knitr/sweave. Regards, Phil -- View this message in context: