similar to: How to comment out entire code parts in Sweave files

Displaying 20 results from an estimated 10000 matches similar to: "How to comment out entire code parts in Sweave files"

2010 Nov 30
2
Print to console from within Sweave script
Hi, is it possible to send some message to the console from within a .Rnw Sweave script, ie. when executing Sweave()? The background is that only in particular circumstances my script is doing some lengthy computations and I would like to print some status information to the console. It seems Sweave redirects all output though. Any suggestions? Thanks a lot for considering my question. All
2007 Aug 22
1
Processing Sweave documents without Sweave
Hi, I am very intrigued by the idea of integrating statistical analysis directly with a paper as Sweave does it. But as I am collaborating with several people and they won't have set up R and also they're very unlikely interested in learning it, I am concerned about how such an Latex/Sweave document will work on their side. Can they Latex-compile the document without having R / Sweave
2008 Mar 19
4
Sweave does not parse \Sexpr{}
Hi, has anybody encountered and solved the following problem? I continued work now on a different computer where I have also used Sweave successfully before. I can run Sweave() and it generates a .tex file. All code chunks are processed and translated to Latex perfectly fine but somehow only the \Sexpr{} tags are not parsed. This is an example .Rnw: \documentclass{article} \usepackage{Sweave}
2008 Feb 26
2
Custom LaTeX tables
Hello, I am very happy that I have Sweave and R to write my papers. But I still have to do some tables by hand since I have not found out how I can customize the latex tables produced by R further (I mainly use xtable()). Like for instance, I have a table which needs an extra row every few rows as a group header and sometimes I want some extra horizontal lines in the table and also a multicolumn
2008 Mar 28
1
Sweave - print \n ?
Hi, this is probably quite stupid but I have no clue what's wrong. Let's say I write the function hline <- function() { cat("\\hline \n") } and call hline() from within a Sweave chunk. Why is there no carriage return after the \hline in the resulting tex file? if I call hline() hline() in the chunk, then I get \hline \hline in the tex code without a linebreak in
2007 Sep 09
1
Sweave figure aspect ratio
Hello, using Sweave, is there any option to preserve the original aspect ratio of plots generated from R code? Consider this Sweave chunk: <<test,echo=F,fig=T,width=2,height=2>>= x <- 1:10 y <- sin(x) par(mar=c(4,4,0,4)) plot(x,y, xlab="x label", ylab="y label" ) @ In Latex, I want to produce a plot of width 2 but don't care about the
2010 Mar 07
1
[LLVMdev] Syntax of 'br', 'switch' and 'indirectbr'
Hi, The 'br' instruction has the syntax: br i1 <cond>, label <iftrue>, label <iffalse> br label <dest> ; Unconditional branch If we know <cond>'s type must be 'i1', <iftrue><iffalse><dest> have to be of type 'label', why does the syntax have to specify them?
2009 May 08
2
[LLVMdev] Splitting a basic block, replacing it's terminator
Hi, I want to insert a conditional branch in the middle of a basic block. To that end, I am doing these steps: (1) Split the basic block: bb->splitBasicBlock() (2) Remove the old terminator: succ->removePredecessor(bb) bb->getTerminator()->getParent() (3) Adding a new terminator: BranchInst::Create(ifTrue, ifFalse, cnd, "", bb); That seems to work, but later passes
2010 Jul 27
2
Documenting different OO-aproaches in R as a package?
Hello, I see some people including myself confused by the different object-oriented approaches in R (S3, S4, OOP, R.oo etc.). Would it be ok to collect examples and solutions for the different OO-packages in one package and add a vignette for documentation? (assuming I find time for this task) I mean in this case the package would not add data or functionality to R or serve as a companion
2010 Jul 04
1
Fwd: Functional programming and R: Recommendations?
Hello R list members, I have a good object-oriented programming and software engineering background (mostly Java) and know some R. I'd like to learn more about functional programming concepts and its support and application in R. Do you have any recommendations (books, links etc)? I read (and like) "Programming in Scala" (Odersky) and just ordered "Funktionale
2009 May 08
0
[LLVMdev] Splitting a basic block, replacing it's terminator
On May 8, 2009, at 4:02 PM, Nick Johnson wrote: > I want to insert a conditional branch in the middle of a basic block. > To that end, I am doing these steps: > > (1) Split the basic block: > bb->splitBasicBlock() > > (2) Remove the old terminator: > succ->removePredecessor(bb) > bb->getTerminator()->getParent() Assuming that the new block will still be a
2010 Aug 20
7
Latex no where to be seen
I'm experimenting using R as a report writer. I'm told LaTex is the destination for my quest. But ?latex() gives me an error. The package manager does not have it. The package installer can't find it. Where is it? It amazes me that there's not a built in "report" function that can produce the same kinds of reports that every report writer and data analysis software in
2008 Aug 19
4
converting coordinates from utm to longitude / latitude
Hi, is there a function in R to convert data read with read.shape and which is originally in UTM coordinates into longitude / latitude coordinates? I found the convUL() function from the PBSmapping package but I have no idea how I could apply that to the read.shape object. Many thanks, Werner __________________________________________________ Do sragenden Schutz gegen Massenmails.
2006 Apr 05
5
List to Array
Hi, this is probably the easiest thing to do but I manage not finding the answer: I have a list with matrices of exact same format and headers. Now I would like to transform the list into an normal array. What is the proper way to do this? as.array changes the entire format and right now I only found the method of creating a new array, going through the entire list and copy the matrix in each
2010 Jul 22
1
class
Hello,   ###  I created two classes "A" and "B". "A" is the superclass of "B".   setClass("A", representation(s1="numeric"),prototype=prototype(s1=8)) setClass("B",contains="A",representation(s2="character"),prototype=list(s2="hi")) myA=new("A") myB=new("B")   ####  I created
2010 Jun 12
1
calling a function with new inputs every 1 minute
I have inputs to a function which are changing all the time - I pull these values from the internet. I then apply a function to the values. What I'd like to do is automate the process so it runs every one minute and adds the output of the function as a new element of a vector. Pseudo code: at Start time: input1_t0, input2_t0, input3_t0 function(input1_t0, input2_t0, input3_t0)
2010 Jul 26
1
OOP module
Hello,   Does anybody know if the OOP module (Chambers & Temple Lang) is going to replace the the S4 (and the S3) class system? http://www.omegahat.org/OOP/oop.pdf Cheers!! Albert-Jan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public
2006 May 12
3
optimal way to compute matrix subtotals?
Hi! I have large matrices, one column per variable and I have a vector of factors / grouping symbols. Then I am computing subtotals for the groups but it takes pretty long and thus I wanted to ask if there is a better way to do it or if this is already the best way: subTotals <- function(x, groupvec) do.call("rbind",lapply(split(x,groupvec),colSums,na.rm=T)) Thanks reading my
2008 Jul 27
4
Object-oriented programming in R for Java programmers?
Hi, I was wondering if anybody might have a reference for me: My R code is growing and getting more and more confusing. Thus, I figure it's time to switch to object-oriented again. I have done oo programming in C++ and Java before but the first few tutorial on R oo were a bit confusing for me. Is there any brief tutorial on oo programming in R especially for people who have done oo in Java
2006 Jan 10
5
matching country name tables from different sources
Hi, Before I reinvent the wheel I wanted to kindly ask you for your opinion if there is a simple way to do it. I want to merge a larger number of tables from different data sources in R and the matching criterium are country names. The tables are of different size and sometimes the country names do differ slightly. Has anyone done this or any recommendation on what commands I