similar to: trace with reference class

Displaying 20 results from an estimated 200 matches similar to: "trace with reference class"

2011 Jan 15
1
Truetype and Opentype font in pdf device
Deal all, I want to know if truetype or opentype fonts are available in pdf device (i.e., pdf() or dev.copy2pdf()), and if so, how to do it? Now I can do as followings: 1. convert ttf to afm using ttf2afm, e.g.: $ ttf2afm Impact.ttf > Impact.afm 2. put the afm file in $R_HOME/library/grDevices/afm 3. register a new type1 font: pdfFonts(Impact=Type1Font("Impact",
2012 Mar 28
1
rep with bigz in gmp
Hi With package:gmp, is this an expected behavior? > rep(1:3, rep(3, 3)) [1] 1 1 1 2 2 2 3 3 3 > rep(as.bigz(1:3), rep(3, 3)) Big Integer ('bigz') object of length 9: [1] 1 2 3 1 2 3 1 2 3 This code is used inside `outer`, so more worse > outer(1:3, 1:3, `*`) [,1] [,2] [,3] [1,] 1 2 3 [2,] 2 4 6 [3,] 3 6 9 > outer(as.bigz(1:3),
2012 Jul 12
1
Modifying a list: what gets copied?
Hi all, In my continued effort to understand when and what R copies, I've designed a small experiment to try and figure out what goes on when a list gets copied - is it a shallow copy or a deep copy. I believe the following experiment isolates the difference: options(digits = 2) powers <- 4:6 n <- setNames(10 ^ powers, paste0("e", powers)) xs <- lapply(n, seq_len) zs <-
2012 Apr 05
1
using for loops with ggplot
Hi all, I have been using ggplot for a few months and ran into this porblem, I am trying to use ggplot in a for loop and it is not working. if I do the following: data=as.data.frame(cbind(rnorm(10),rnorm(10),rnorm(10))) ############ pp=ggplot(data, aes(x=(1:10), y=data[,1])) pp=pp+geom_line(aes(x=(1:10),y = data[,1]),lty=2) pp=pp+geom_line(aes(x=(1:10),y = data[,2]),lty=2)
2012 Feb 21
1
Private Variables in R5-Classes possible?
Hi list, is there a way to define some kind of private Variable? I would like to prevent the user from manipulating fields on his own, in order to not destroy data structures. The problem is, that as soon as the variable exists in the environment it is accessible via t$secret_value. test <- setRefClass("test", fields=list( secret = function(value){ cat("the function was
2018 Jan 21
1
Split charts with ggplot2, tidyquant
Thanks for the reminder about lattice! I did some searching and there's a good example of manipulating the size of subplots using the `position` argument (see pp. 202-203 in the Trellis Users Guide: http://ml.stat.purdue.edu/stat695t/writings/Trellis.User.pdf). This is not within the paneling environment with the headers like in other trellis plots though, so you'll have to do a bit
2012 Oct 27
2
Class generator functions for reference classes
As of rev. 61035 in r-devel, setRefClass() now returns a generator function, as setClass() has done since 2.15.0. The convenient style is now: mEdit <- setRefClass("mEdit",......) xx <- mEdit(data = xMat) instead of xx <- mEdit$new(data = xMat) The returned object still has fields and methods accessible as before. See the "Value" and "Reference Class
2012 Mar 02
0
devtools 0.6
# devtools The aim of `devtools` is to make your life as a package developer easier by providing R functions that simplify many common tasks. Devtools is opinionated about how to do package development, and requires that you use `roxygen2` for documentation and `testthat` for testing. Future version will relax these opinions - patches are welcome! You can track (and contribute to) development of
2012 Mar 02
0
devtools 0.6
# devtools The aim of `devtools` is to make your life as a package developer easier by providing R functions that simplify many common tasks. Devtools is opinionated about how to do package development, and requires that you use `roxygen2` for documentation and `testthat` for testing. Future version will relax these opinions - patches are welcome! You can track (and contribute to) development of
2010 Dec 24
0
ggplot2 0.8.9 - Merry Christmas version
ggplot2 ------------------------------------------------------------ ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle (like drawing legends) as well as providing a powerful model of graphics that makes it easy to produce
2010 Dec 24
0
ggplot2 0.8.9 - Merry Christmas version
ggplot2 ------------------------------------------------------------ ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle (like drawing legends) as well as providing a powerful model of graphics that makes it easy to produce
2018 Jan 20
2
Split charts with ggplot2, tidyquant
For this kind of control you will probably need to move to base graphics and utilize the `fig` argument in par(), in which case you would want to run the plot() command twice: once with your first outcome and once with your second, changing the par() settings before each one to control the size. On 01/19/2018 01:39 PM, Eric Berger wrote: > Hi Charlie, > Thanks. This is helpful. As
2018 Jan 20
0
Split charts with ggplot2, tidyquant
That (the need for base graphics) is false. It certainly **can** be done in base graphics -- see ?layout for a perhaps more straightforward way to do it along the lines you suggest. However both lattice and ggplot are based on grid graphics, which has a similar but slightly more flexible ?grid.layout function which would allow one to size and place subsequent ggplot or lattice graphs in an
2018 Jan 19
0
Split charts with ggplot2, tidyquant
Hi Charlie, Thanks. This is helpful. As mentioned in my original question, I want to be able to plot a few such charts on the same page, say a 2 x 2 grid with such a chart for each of 4 different stocks. Using your solution I accomplished this by making a list pLst of your ggplots and then calling cowplot::plot_grid( plotlist=pLst, nrow=2, ncol=2 ) That worked fine. The one issue I have is that
2012 Aug 05
1
setting invalid fields on reference classes sometimes allowed
I've found that reference class objects tend to behave like plain old environments wrt field access, unless a method on e.g. $<- is explicitly defined. Here is a code snippet: library(methods) Foo <- setRefClass("Foo") foo <- Foo$new() foo$a <- 2 # why does this succeed? not a valid field! ## set a silly $<- method setReplaceMethod("$", "Foo",
2018 Jan 19
2
Split charts with ggplot2, tidyquant
So the general strategy for getting these into separate panels in ggplot is to have a single variable that will be your response and a factor variable that indexes which original variable it came from. This can be accomplished in many ways, but the way I use is with the melt() function in the reshape2 package. For example, library(reshape2) plotDF <- melt(SPYdf, ??? ??? ??? ??? ??? ???
2006 Aug 12
0
anova.mlm for single model (one-way repeated measured anova)
On Sat, 12 Aug 2006, takahashi kohske wrote: > Dear list members: > > I'd like to one-way repeated measured anova by using mlm. > I'm using R-2.3.1 and my code is: > > dat<-matrix( c(9,7,8,8,12,11,8,13, 6,5,6,3,6,7,10,9, > 10,13,8,13,12,14,14,16, 9,11,13,14,16,12,15,14), > ncol=4, dimname=list(s=1:8, c=1:4)) >
2010 Mar 13
0
ggplot2: version 0.8.7
ggplot2 ------------------------------------------------------------ ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle (like drawing legends) as well as providing a powerful model of graphics that makes it easy to produce
2010 Mar 13
0
ggplot2: version 0.8.7
ggplot2 ------------------------------------------------------------ ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle (like drawing legends) as well as providing a powerful model of graphics that makes it easy to produce
2012 Mar 02
0
ggplot2 0.9.0
# ggplot2 ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle (like drawing legends) as well as providing a powerful model of graphics that makes it easy to produce complex multi-layered graphics. Find out more at