[R] Package documentation in dissertation
Hey Everyone, I wrote up a library for my dissertation work, and I'd love to include it as an appendix. I have found ways to export the Rd files as html, txt and pdf/ps, but not a raw tex export. I've had to resort to dumping it into text files, and just using verbatim in my LaTeX code. Does anybody have any recommendations or experiences with dealing with this? Please CC me on any response, as I only get summary emails from the list. Thanks in advance! Brian __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Package documentation in dissertation
The closest I can get to the compiled LaTeX pdf version as possible as an appendix. Is there a way to get the raw LaTeX code from the package documentation, as well as the configuration/commands for compiling them? stephen sefick wrote: What would you like to do? Is it not the code that you would like to include in your dissertation? Stephen On Mon, Mar 15, 2010 at 7:46 PM, statmobile wrote: Hey Everyone, I wrote up a library for my dissertation work, and I'd love to include it as an appendix. I have found ways to export the Rd files as html, txt and pdf/ps, but not a raw tex export. I've had to resort to dumping it into text files, and just using verbatim in my LaTeX code. Does anybody have any recommendations or experiences with dealing with this? Please CC me on any response, as I only get summary emails from the list. Thanks in advance! Brian __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Package documentation in dissertation
Hey Gabor, Thanks, I tried that, although I can't compile it directly. Do you know where I can get the R LaTeX definitions in order to compile that? Thanks! Gabor Grothendieck wrote: Try: R CMD Rdconv --type=latex myfile.Rd On Mon, Mar 15, 2010 at 8:46 PM, statmobile wrote: Hey Everyone, I wrote up a library for my dissertation work, and I'd love to include it as an appendix. I have found ways to export the Rd files as html, txt and pdf/ps, but not a raw tex export. I've had to resort to dumping it into text files, and just using verbatim in my LaTeX code. Does anybody have any recommendations or experiences with dealing with this? Please CC me on any response, as I only get summary emails from the list. Thanks in advance! Brian __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Package documentation in dissertation
Thanks Gabor, that looks to be exactly what I was seeking. I'll play around with that. Thanks, Brian On Tue, Mar 16, 2010 at 05:19:23AM -0400, Gabor Grothendieck wrote: > See: > https://stat.ethz.ch/pipermail/r-help/2005-April/070581.html > > On Mon, Mar 15, 2010 at 11:16 PM, statmobile wrote: > > Hey Gabor, > > > > Thanks, I tried that, although I can't compile it directly. Do you know > > where I can get the R LaTeX definitions in order to compile that? > > > > Thanks! > > > > Gabor Grothendieck wrote: > >> > >> Try: > >> > >> R CMD Rdconv --type=latex myfile.Rd > >> > >> > >> On Mon, Mar 15, 2010 at 8:46 PM, statmobile wrote: > >>> > >>> Hey Everyone, > >>> > >>> I wrote up a library for my dissertation work, and I'd love to include it > >>> as > >>> an appendix. I have found ways to export the Rd files as html, txt and > >>> pdf/ps, but not a raw tex export. I've had to resort to dumping it into > >>> text files, and just using verbatim in my LaTeX code. Does anybody have > >>> any > >>> recommendations or experiences with dealing with this? > >>> > >>> Please CC me on any response, as I only get summary emails from the list. > >>> > >>> Thanks in advance! > >>> Brian > >>> > >>> __ > >>> R-help@r-project.org mailing list > >>> https://stat.ethz.ch/mailman/listinfo/r-help > >>> PLEASE do read the posting guide > >>> http://www.R-project.org/posting-guide.html > >>> and provide commented, minimal, self-contained, reproducible code. > >>> > > > > -- Brian J. Lopes PhD Student Department of Statistics and Operations Research University of North Carolina at Chapel Hill To know that we know what we know, and that we do not know what we do not know, that is true knowledge --Henry David Thoreau (quoting Confucius): Walden __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Applying function to elements of matrices in a list
Hello R-help, Please cc me on all responses, as I only receive summary emails from this list. I'm wondering if anybody has any tips on how to accomplish this efficiently. I have a list of matrices, and I'm trying to get the mean of the [i,j]'th element of each matrix in a list. So if I have a list of matrices, say x <- list(a=matrix(rnorm(4),nrow=2),b=matrix(rnorm(4),nrow=2)) How would I get a 2x2 matrix, where the i,j'th element would be the mean across the the list of each of the i,j'th elements in the list? That is, where the [1,2] element would be the average of a[1,2] and b[1,2]. Of course my list and matrices are much larger, and I was hoping there would be some trick with lapply that I may be missing here. Thanks, Brian __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Applying function to elements of matrices in a list
On 11/25/2010 09:44 AM, Dimitris Rizopoulos wrote: try this: Reduce("+", x) / length(x) Thanks Dimitris, that's very slick, I was unaware of this Reduce function. The issue, is that I actually wanted to do a trimmed mean, and if things prove possible even the median. Is there a way to apply a generic function in the manner I described? Thanks, Brian Best, Dimitris On 11/25/2010 3:42 PM, statmobile wrote: Hello R-help, Please cc me on all responses, as I only receive summary emails from this list. I'm wondering if anybody has any tips on how to accomplish this efficiently. I have a list of matrices, and I'm trying to get the mean of the [i,j]'th element of each matrix in a list. So if I have a list of matrices, say x <- list(a=matrix(rnorm(4),nrow=2),b=matrix(rnorm(4),nrow=2)) How would I get a 2x2 matrix, where the i,j'th element would be the mean across the the list of each of the i,j'th elements in the list? That is, where the [1,2] element would be the average of a[1,2] and b[1,2]. Of course my list and matrices are much larger, and I was hoping there would be some trick with lapply that I may be missing here. Thanks, Brian __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Applying function to elements of matrices in a list
On 11/25/2010 10:30 AM, Peter Ehlers wrote: On 2010-11-25 07:06, statmobile wrote: On 11/25/2010 09:44 AM, Dimitris Rizopoulos wrote: try this: Reduce("+", x) / length(x) Thanks Dimitris, that's very slick, I was unaware of this Reduce function. The issue, is that I actually wanted to do a trimmed mean, and if things prove possible even the median. Is there a way to apply a generic function in the manner I described? You could use the abind function in the abind package to convert your list to a 3d array and then use apply on that: require(abind) xa <- abind(x, along=3) apply(xa, 1:2, mean, trim=0.3) This is exactly what I was seeking, thank you Peter & Dimitris. Peter Ehlers Thanks, Brian Best, Dimitris On 11/25/2010 3:42 PM, statmobile wrote: Hello R-help, Please cc me on all responses, as I only receive summary emails from this list. I'm wondering if anybody has any tips on how to accomplish this efficiently. I have a list of matrices, and I'm trying to get the mean of the [i,j]'th element of each matrix in a list. So if I have a list of matrices, say x<- list(a=matrix(rnorm(4),nrow=2),b=matrix(rnorm(4),nrow=2)) How would I get a 2x2 matrix, where the i,j'th element would be the mean across the the list of each of the i,j'th elements in the list? That is, where the [1,2] element would be the average of a[1,2] and b[1,2]. Of course my list and matrices are much larger, and I was hoping there would be some trick with lapply that I may be missing here. Thanks, Brian __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Giving vector of colors to line in plots
Hey all, I can't for the life of me figure out what I'm missing here. I'm trying to change the color of the line in a time series type plot. I can change the point colors and symbols no problem, but for some reason the colors do not get passed to the lines, regardless of if I do type="b" or type="l". The sample code I'm using is below. Any help would be greatly appreciated. Also, please CC me, as I only get daily summaries of the mailing list. Thanks, Brian ## Changing plot attributes through the plot set.seed(33) x <- rpois(7,lambda=7) y <- rpois(7,lambda=5) cols.x <- c(rep("black",2),rep("red",3),rep("black",2)) cols.y <- c(rep("blue",3),rep("yellow",2),rep("blue",2)) points.x <- c(rep("x",2),rep("O",3),rep("x",2)) points.y <- c(rep(8,3),rep(17,2),rep(8,2)) plot(x,col=cols.x,pch=points.x,type="b",ylim=c(0,15)) points(y,col=cols.y,pch=points.y,type="b") __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Giving vector of colors to line in plots
On 02/07/2011 02:15 AM, Jinsong Zhao wrote: On 2011-2-7 14:15, statmobile wrote: set.seed(33) x <- rpois(7,lambda=7) y <- rpois(7,lambda=5) cols.x <- c(rep("black",2),rep("red",3),rep("black",2)) cols.y <- c(rep("blue",3),rep("yellow",2),rep("blue",2)) points.x <- c(rep("x",2),rep("O",3),rep("x",2)) points.y <- c(rep(8,3),rep(17,2),rep(8,2)) plot(x,col=cols.x,pch=points.x,type="b",ylim=c(0,15)) points(y,col=cols.y,pch=points.y,type="b") the following code may give hints... segments(1:6,x[-7],2:7,x[-1], col = cols.x) segments(1:6,y[-7],2:7,y[-1], col = cols.y) regards, Jinsong Thanks Jinsong, this works like a charm. I'll need to dive deeper into the segments function. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Setting matrix dimnames in a list
Hey All, I was wondering if I could solicit a little input on what I'm trying to do here. I have a list of matrices, and I want to set their dimnames, but all I can come up with is this: x <- matrix(1:4,2) y <- matrix(5:8,2) z <- list(x,y) nm <- c("a","b") nms <- list(nm,nm) z <- lapply(z,function(x)dimnames(x)<-nms) As you can see, this doesn't quite work. Could anybody help me, and bonus points if you can help me do this efficiently. Please cc my email address, because I only get summaries of the list. Thanks in advance! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Setting matrix dimnames in a list
__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.