similar to: Error message library()

Displaying 20 results from an estimated 20000 matches similar to: "Error message library()"

2010 Nov 29
1
Sweave choking on \\ in filename
Dear all, Sweave chokes when using "\\" in the path to the Rnw file. Using "/" works fine. The problem is that Eclipse+StatET uses "\\" in the filename. And example of the error, traceback and sessionInfo are given below. Best regards, Thierry > Sweave("Q:\\BMK\\cursussen\\interne_opleiding\\deelnemerslijst.Rnw", syntax="SweaveSyntaxNoweb")
2007 Dec 03
3
ggplot2: Choosing colours
Dear useRs, I'm trying to specify the colour of a factor with ggplot2. The example below gets me close to what I want, but it's missing a legend. Any ideas? Thanks, Thierry library(ggplot2) dataset <- data.frame(x = rnorm(40), y = runif(40), z = gl(4, 10, labels = LETTERS[1:4])) ggplot(data = dataset, aes(x = x, y = y, group = z)) + geom_point(colour = c("red",
2011 Mar 10
1
Problem with defining new method for residuals()
Dear all, I'm writing a package and I would like to reuse the residuals() function. When I use a function which calls the redefined residuals (for my custom class) I get an error (see below). It looks like the wrong method is used. The strange this is, that when it execute the code manually it get no error. Any suggestions? Best regards, Thierry The entire source code is at
2007 Feb 13
1
RE2: Suddenly "Subscript out of bounds"
If you tell me how to update R itself automatically, I will go for your advice. I am not aware of any method to do it... Bye Rick "ONKELINX, Thierry"
2009 Jul 22
1
Link to documentation in another package
Dear all, One of the functions that I wrote (ggsave.latex) extents the functionality of a function (ggsave) in another package (ggplot2). Instead of copying all the information I would like to create a link in the helpfile of ggsave.latex to the helpfile of ggsave. I tried \code{\link{ggsave}} and \code{\link{ggplot2::ggsave}}, but neither worked. Both cases gave a 'missing link' warning.
2011 Apr 28
1
Coding design with repeated measurements in the survey package
Dear all, I'm working on a design with rotating panels. Each site is sampled every X year. Have a look at the code below the get an idea of the design. In reality the number of sites will be (much) higher. However I'm not sure if I coded the design correctly in svydesign(). Can someone confirm that it is either correct or wrong? I've added the lmer() equivalent that I want to
2009 May 19
2
Coord_equal in ggplot2
Dear all, I'm plotting some points on a graph where both axes need to have the same scale. See the example below. Coord_equal does that trick but in this case it wastes a lot of space on the y-axis. Setting the limits of the y-axis myself was no avail. Any suggestions to solve this problem? library(ggplot2) ds <- data.frame(x = runif(1000, min = 0, max = 300000), y = runif(1000, min =
2007 Jul 18
1
Strange warning in summary.lm
Dear useRs, Lately I noticed a strange warning in the summary of a lm-object. Any idea what this warning is about? I'm using R 2.5.1 on Win XP pro. > x <- rnorm(100) > y <- rnorm(100) > summary(lm(y~x)) Call: lm(formula = y ~ x) Residuals: Min 1Q Median 3Q Max -1,77809 -0,68438 -0,04409 0,63891 2,30863 Coefficients: Estimate Std.
2009 Apr 17
2
Generate bivariate binomial data
Dear all, Could someone point me to a function or algorithm to generate random bivariate binomial data? Some details about what I'm trying to do. I have a dataset of trees who were categorised as not damaged or damaged. Each tree is measured twice (once in two consecutive years). The trees can recover from the damage but the data is clearly correlated. As a (un)damaged tree is more likely
2009 Mar 11
1
Ggplot2: saving a grid with multiple plots
Hi all, I have managed to create a figure on the screen with multiple plots in it. Something like the example below. When I save that with ggsave(), only the last plot gets saved (pPath in the example) instead of the entire figure. Any suggestions how I can save this kind of figures automated? Thanks, Thierry library(ggplot2) pPoint <- qplot(unemploy/pop, psavert, data=economics) pPath
2009 Apr 22
1
Gee with nested desgin
Dear all, Is it possible to incorporate a nested design in GEE? I have measurements on trees that where measured in two years. The trees are nested in plots. Each plot contains 24 trees. The number of plots is 72. Hence we would expect 2 * 24 * 72 = 3456 data points. A few are missing, so we end up wih 3431 data points. This is what I have tried until now. #assuming independence between trees
2007 Sep 03
1
Legend issue with ggplot2
Dear useRs, I'm struggling with the new version of ggplot2. In the previous version I did something like this. But now this yield an error (object "fill" not found). library(ggplot2) dummy <- data.frame(x = rep(1:10, 4), group = gl(4, 10)) dummy$y <- dummy$x * rnorm(4)[dummy$group] + 5 * rnorm(4)[dummy$group] dummy$min <- dummy$y - 5 dummy$max <- dummy$y + 5 ggplot(data
2007 Jul 25
1
Ggplot2 equivalent of axis and problem with log scale
Dear useRs, Recently I've discorved ggplot2 and I must say that I really like it, although the documentation still is a working in progress. My first question: How can I change the position of the labels and the text of the labels? With a basic plot I would use axis(2, at = position.of.the.ticks, labels = text.at.the.ticks). Could someone provide me with an example of how to do this with
2008 Dec 16
1
Prediction intervals for zero inflated Poisson regression
Dear all, I'm using zeroinfl() from the pscl-package for zero inflated Poisson regression. I would like to calculate (aproximate) prediction intervals for the fitted values. The package itself does not provide them. Can this be calculated analyticaly? Or do I have to use bootstrap? What I tried until now is to use bootstrap to estimate these intervals. Any comments on the code are welcome.
2008 Oct 23
1
Automating citations in Sweave
Dear all, Is there an elegant way to add citations of packages when using Sweave? Ideally I'd like a function which creates a Bibtex-file with the packagenames as keys. The idea is to use \cite{packagename} or \cite{R} in LaTeX. I know you can get the Bibtex entry with toBibtex(citation("packagename")). But after updating R or a package one needs to update the bib-file too. When
2010 Apr 07
1
Struggeling with svydesign()
Dear all, We are analysing some survey data and we are not sure if we are using the correct syntax for our design. The population of interest is a set of 4416 polygons with different sizes ranging from 0.003 to 45.6 ha, 7460 ha in total. Each polygon has a binary attribute (presence/absence) and we want to estimate the probability of presence in the population. We used sampling with replacement
2010 Sep 21
2
plot xyz data in 2D
Hello, I want to make an 2D plot of .xyz data. So plot on x-axis and y-axis and use a color scale for the z. For every x-location along a cross section of the soil at several depths a resistivity must be displayed. This must result in a picture/graph which shows the resistivity for that cross section. The depths differ for each x-location. How can I do that? In fact it is an cross
2011 Apr 27
6
Assignments inside lapply
Dear all I would like to ask you if an assignment can be done inside a lapply statement. For example I would like to covert a double nested for loop for (i in c(1:dimx)){ for (j in c(1:dimy)){ Powermap[i,j] <- Pr(c(i,j),c(PRX,PRY),f) } } to something like that: ij<-expand.grid(i=seq(1:dimx),j=(1:dimy)) unlist(lapply(1:nrow(ij),function(rowId) { return
2009 Dec 22
2
Nested For loops
Dear R experts, Might be very simple question to ask but would be insightful. As the same story of nested "for loops". following is the code that I am using to get the autocorrelation function of the sample data. I have tried to get rid of for loops but since I am touching R after such a long time that I need to practice more but I need help to revive my skills. I know that apply() or
2008 Apr 08
4
permutation test assumption?
Dear all, Can I do a permutation test if the number of individuals in one group is much bigger than in the other group? I searched the literature but I didin´t find any assumption that refers to this subject for permutation tests. Best regards João Fadista Ph.d. student UNIVERSITY OF AARHUS Faculty of Agricultural Sciences Dept. of Genetics and Biotechnology Blichers Allé 20, P.O.