similar to: ggplot2, building a simple formula interface

Displaying 20 results from an estimated 200 matches similar to: "ggplot2, building a simple formula interface"

2009 Dec 07
1
rgl keyboard shortcut for translation on Mac?
Hello Everyone. I?m on a Mac, using rgl. Thanks to all the developers and maintainers on it! If I drag the mouse, I can rotate the view, if I hold down the option key or the ctrl key and drag, I get scaling (though at times I seem to alter the perspective?). Adding the shift key doesn't seem to modify anything. So, what I can't find is a key combination that translates the object.
2010 Jun 26
1
boot with strata: strata argument ignored?
Hello All. I must be missing the really obvious here: mm <- function(d, i) median(d[i]) b1 <- boot(gravity$g, mm, R = 1000) b1 b2 <- boot(gravity$g, mm, R = 1000, strata = gravity$series) b2 Both b1 and b2 seem to have done (almost) the same thing, but it looks like the strata argument in b2 has been ignored. However, str(b1) vs str(b2) does show that the strata have been noted
2010 Nov 29
3
Replacing several rows of a matrix at once
Hello Folks. This must be a silly question with a (not) obvious (to me) answer. Consider this: tmp <- matrix(1:200, nrow = 20) vec <- 300:309 tmp[9,] <- vec # replacing one row works fine p <- c(3, 11, 17) tmp[p,] <- vec # replacing multple rows pastes the values down a column and recycles vec. What I want to do is replace multiple rows simultaneously at once. I suppose I can
2010 Apr 19
1
What is mclust up to? Different clusters found if x and y interchanged
Hello All... I gave a task to my students that involved using mclust to look for clusters in some bivariate data of isotopes vs various mining locations. They discovered something I didn?t expect; the data (called tur) is appended below. p <- qplot(x = dD, y = dCu65, data = tur, color = mine) print(p) # simple bivariate plot of the data; looks fine mod1 <- Mclust(tur[,2:3]) mod1$G mod2
2010 Dec 04
2
Error in calcCurveGrob(x, x$debug) : End points must not be identical
Hi All... I haven?t found mention of this error anywhere. I'm trying to draw spline curves using grid graphics. Most of the time, I have no problems, but I have some data sets that give the error in the subject line. I'm not sure which end points are identical, but the end points passed to the function are definitely not identical. Any assistance appreciated! Bryan tst <-
2009 Oct 02
1
ggplot2: proper use of facet_grid inside a function
Hello Again R Folk: I have found items about this in the archives, but I?m still not getting it right. I want to use ggplot2 with facet_grid inside a function with user specified variables, for instance: p <- ggplot(data, aes_string(x = fac1, y = res)) + facet_grid(. ~ fac2) Where data, fac1, fac2 and res are arguments to the function. I have tried p <- ggplot(data,
2010 Nov 20
1
Grid newbie: aligning & scaling viewports
Oh Knowledgeable Ones: I'm working on a project using grid graphics (for the first time). A toy example is given below, run it simply with >foobar() I am wondering why the pink dot and concentric circles are not centered on the 3-color axis system. Further, I feel like the concentric circles don't have the intended radius - if my math is right, the outmost circle should touch the
2010 Aug 26
3
Passing data to aov
Hello Again Gurus and Lurkers: I?m trying to build a very user-friendly function which does aov without having the user type in a formula (which would be tedious in this case). The idea is to take the response from a PCA score matrix, and the factors from a list. A simple example is the function given below, along with test data and a sample call to the function. I'm certainly having
2009 Oct 06
1
ggplot2: mapping categorical variable to color aesthetic with faceting
Hello Again... I?m making a faceted plot of a response on two categorical variables using ggplot2 and having troubles with the coloring. Here is a sample that produces the desired plot: compareCats <- function(data, res, fac1, fac2, colors) { require(ggplot2) p <- ggplot(data, aes(fac1, res)) + facet_grid(. ~ fac2) jit <- position_jitter(width = 0.1) p <- p +
2010 Aug 19
0
Gathering different data types for aov etc
Hello List Folks. I?m trying to do manova using a function which assembles the response (LHS) and factors (RHS) from different sources. When I do so, the model routines complain that I'm passing a list for the RHS when I don't think I am. Here's a toy example: r <- matrix(rnorm(30), ncol = 3) # toy data td <- list(d = rnorm(10), f1 = sample(c("A",
2009 Dec 16
1
Rgraphviz installation
Hi, I wanted to install Rgraphviz. From the R GUI, I downloaded the package but when I tried to load it I got the following error message: "This application has failed to start because libcdt-4.dll was not found. Re-installing the application may fix this problem." The R commands and errors are: > utils:::menuInstallPkgs() trying URL
2011 Nov 10
0
Package build/check OK, install looking for irrelevant function
Hello R Users: I have 3 packages that I authored and they build and check just fine locally. However, when I try to install the local source packages (from the .tar.gz), I get the following message: Error in `+.POSIXt`(as.POSIXct(origin, tz = tz, ...), x) : could not find function "%is.a%" In addition: Warning message: In install.packages(file.choose(), .libPaths()[1], NULL, type =
2010 Jan 02
3
Help needed on applying a function across different data sets and aggregating the results into a single data set
Hi folks, Wish y'all a Happy New Year 2010! I need some help with the following: Say I have lots of data sets, on which I have to apply a certain function on the same set of columns in each of the data set. Let's take, for ex, the typical data set is: df1 <- as.data.frame(cbind(rnorm(10),rnorm(10))) names(df1)[1] <- "A" names(df1)[2] <- "B" There are many
2009 Dec 20
1
basic proto question
Dear list, I made the following example of a proto object that contains some data and a spline interpolation. I don't understand why test$predict() fails with this error message: Error: evaluation nested too deeply: infinite recursion / options(expressions=)? Best regards, baptiste test <- proto(source = data.frame(x=1:10, y=rnorm(10)), raw = function(.){
2009 Oct 15
1
ImageMagick not seen by movie3d function from rgl package
Hello R-users, I have downloaded and installed a binary version for Windows OS of ImageMagick (ImageMagick6.5.6-10-q16-windows-dll.exe), I have installed the rgl package and i've tried running the following example from ?movie3d() library(rgl) open3d() plot3d( cube3d(col="green") ) M <- par3d("userMatrix") play3d( par3dinterp( userMatrix=list(M,
2010 Apr 02
1
R abrupt exit
Dear Lists: I recently ran quite annoyance problem while running R on Ubuntu 9.10. When running the program, the system suddenly exit from the R session with the following warnings: ############################ ############# OMP: Hint: This may cause performance degradation and correctness issues. Set environment variable KMP_DUPLICATE_LIB_OK=TRUE to ignore this problem and force the program
2008 Dec 10
1
First call to constructor fails (R.oo)
Hi all, I'm trying to do some object-oriented programming in R using the R.oo package. Right from the start I encountered a strange (at least for me) problem. I define a new class/constructor based on the R.oo documentation. However the first attempt to create an object fails: === Code: === library(R.oo); setConstructorS3("MyClass",function(param) { print(param);
2004 Oct 28
1
qustion with lars (lasso) package
Dear All, I am using lars package written by Dr. Trevor Hastie, the version is lars_0.9-5 downloaded from cran. When I ran the diabetes example data attached in package, I found that the beta outputs from different machines are different. The difference is only about 10^-11 to 10^-12, some friends suggested that it possibly is a machine precision problem. But I check the machine numerical
2010 Apr 26
1
Problem with 'lars' package
Hi, I'm having trouble running 'lars'. When I install it I get the following warning: >install.packages('lars') Warning in install.packages("lars") : argument 'lib' is missing: using 'C:\Users\Anna\Documents/R/win-library/2.10' --- Please select a CRAN mirror for use in this session --- trying URL
2009 Oct 02
1
nls not accepting control parameter?
Hi I want to change a control parameter for an nls () as I am getting an error message "step factor 0.000488281 reduced below 'minFactor' of 0.000976562". Despite all tries, it seems that the control parameter of the nls, does not seem to get handed down to the function itself, or the error message is using a different one. Below system info and an example highlighting the