similar to: Strange bug in my package

Displaying 20 results from an estimated 9000 matches similar to: "Strange bug in my package"

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
2013 Jan 28
1
incorrect import?
Dear all, I'm not getting what I'm doing wrong. The line below from my read.fsa.bin function throws an error when just loading my AFLP package and disappears when I load the zoo package as well. #the line that throws the error Index <- which(Peak == rollmax(Peak, k = 1 + 2 * floor((min(diff(SizeStandard)) * Fs - 1) / 2), fill = -Inf)) #the error Error in UseMethod("rollmax")
2009 Jul 16
0
Cryptic error with Roxygen
Dear all, I'm using Roxygen for the first time and I'm getting a rather cryptic error message. I must be doing something wrong but I have no clue what is it. Any suggestions? Regards, Thierry roxygenize("AFLP", roxygen.dir = "AFLP", copy.package = FALSE, unlink.target = FALSE) Writing AFLP.outlier to AFLP/man/AFLP.outlier.Rd Writing AFLP.outlier to
2012 Nov 05
2
averaging a list of matrices element wise
Dear all, I have a list of n matrices which all have the same dimension (r x s). What would be a fast/elegant way to calculate the element wise average? So result[1, 1] <- mean(c(raw[[1]][1, 1] , raw[[2]][1, 1], raw[[...]][1, 1], raw[[n]][1, 1])) Here is my attempt. #create a dummy dataset n <- 3 r <- 5 s <- 6 raw <- lapply(seq_len(n), function(i){ matrix(rnorm(r * s), ncol =
2013 Apr 04
1
Non-vignette sweave file in package
Dear all, I'm documenting an elaborate analysis as a private package. The package writes all required output to a database. I use a Sweave file to transform all the results from the database into a report. Now I would like to add this Sweave to my package. I'm a bit puzzled on how to do that. It is not a vignette: the data is not available when the package is build and I need to
2012 Dec 14
1
Problem loading .Rdata file
Dear all, I'm having troubles migrating a large matrix from one system to another. #system 1: Ubuntu 12.04, 64-bit, running R 2.15.2 # do some simulations # save the simulations > save(Output, file = "Simulations.Rdata") #Output is a numeric matrix with 6 columns and about 2M rows. Use ftp to transfer the Simulations.Rdata file to system 2 #system2: Windows XP, 32-bit running
2014 Apr 03
1
summary of lme4.0 model in package
Dear all, My package has Depends: lme4.0 in the DESCRIPTION. I need to extract the fixed effect of a model and their standard errors. I use coef(summary(model)) inside a function to do that. Model is the output of a call to glmer() from the lme4.0 package. coef(summary(model)) throws an error: $ operator is invalid for atomic vectors I have tracked it down to a problem with summary(model)
2013 Jul 30
1
Error from R CMD check
Dear all, I'm puzzled by the error I get from R CMD check one of my packages. I'm running R CMD check with the --as-cran flag and it get the error both from running it from the command line as from within Rstudio. On the same machine R CMD check on my GRTS package (https://r-forge.r-project.org/R/?group_id=1027) works fine. Any suggestions on how to fix this? I can send the source code
2012 Nov 26
2
puzzling RODBC error
Dear all, I'm trying to connect to an MSAccess database (ArcGIS personal geodatabase). I keep getting an error about the channel when using sqlQuery(). However, sqlTables() does not complain about the channel and lists all tables in the database. If I try sqlFetch(), then R crashes. I'm happy to hear suggestions on how to solve this. Best regards, Thierry > MDB <-
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.
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 =
2017 Sep 08
0
post_processor in rmarkdown not working
That is strange. Another function in the same package (INBOmd::inbo_rapport) uses the same trick. I actually started by copying the post_processor() from that function. INBOmd::inbo_rapport() works both with and without BibTex. Working examples are source/inbo_rapport and source/inbo_rapport_basic from https://github.com/inbo/inbomd_examples. Note that you need some extra work after installing
2014 Dec 09
2
UTF8 markdown vignette
Dear all, I'm trying to use a Markdown vignette with UTF-8 encoding. It compiles well when knitting the vignette in RStudio, but it fails to recognize the UTF-8 settings when building the source package. Can someone point out what I'm doing wrong? I tried to put the relevant information below. Best regards, Thierry Details: Using 64-bit R 3.1.2 with encoding = "native.enc"
2013 Nov 25
0
R: lmer specification for random effects: contradictory reults
Dear Thierry, thank you for the quick reply. I have only one question about the approach you proposed. As you suggested, imagine that the model we end up after the model selection procedure is: mod2.1 <- lmer(dT_purs ~ T + Z + (1 +T+Z| subject), data =x, REML= FALSE) According to the common procedures specified in many manuals and recent papers, if I want to compute the p_values relative to
2014 Dec 09
2
UTF8 markdown vignette
Dear Duncan, The UTF-8 characters aren't properly rendered in the pdf version of the vignette. $?? ????? ?????? ?????? ????? ?? ?? is rendered as $????? ?????????? ???????????? ????? ?????? ? ???????? ???????? The same problem occurs when I use render("vignette.md", output_format = "mypackage::mystyle"), instead of render("vignette.md", output_format =
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
2017 Sep 07
2
post_processor in rmarkdown not working
On 07/09/2017 2:04 PM, Duncan Murdoch wrote: > On 07/09/2017 10:11 AM, Thierry Onkelinx wrote: >> Dear Duncan, >> >> Thanks for chiming in. Could you explain how you set debug() on >> post_processor()? I've tried adding debug(post_processor) to >> rsos_article() or adding debug(post_processor) when after post_processor >> was defined in the debugger.
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
2017 Sep 07
0
post_processor in rmarkdown not working
On 07/09/2017 10:11 AM, Thierry Onkelinx wrote: > Dear Duncan, > > Thanks for chiming in. Could you explain how you set debug() on > post_processor()? I've tried adding debug(post_processor) to > rsos_article() or adding debug(post_processor) when after post_processor > was defined in the debugger. Neither work for me. Not working for me either right now for some reason
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