[Rd] Suppress specific warnings
Hello, is there a convenient way to suppress only *specific* warnings? (I know about ?suppressWarnings) I depend on another package, from which I want to suppress only some warnings, but not others. Felix __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Snippets from other packages/ License
Thanks Brian and Hadley, these all seem to be reasonable approaches! (For the current package I think I'll depend on the other one, but it's good to know how to proceed for future situations …). Felix Am 14.03.2013 um 16:52 schrieb Hadley Wickham h.wick...@gmail.com: If you wish to fork the original code and include the code directly in your package, then your package will also need to be GPL=3, you will need to list the authors of that code as Contributors in your DESCRIPTION file, and I would strongly recommend that you place this code in a separate .R file in your package, with a separate Copyright and License comment block in that separate file stating the origins and license for this code snippet. Another option is to email the original author and ask if they'd be willing to license the code to you under whatever license your package currently uses. Hadley -- Chief Scientist, RStudio http://had.co.nz/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Snippets from other packages/ License
Hello, I want to use a function from another package (which is GPL=3), about 20 lines of code, in my own package. I somewhat hesitate to depend on the entire package just for this single function, but of course I want to credit the original authors. What would be the best way to do that? Where should I put that credit? Or should I proceed completely different? Best, Felix __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Precompiled vignette on CRAN
Thanks for your help on this topic. In fact, one of the vignettes needs hours to run some simulations; hence I'm going to provide the pdf for CRAN. * - which reminds me -- what is the correct place to list vignette dependencies? Suggests: ? I now added a %\VignetteDepends{lme4} statement to the vignette. Best, Felix __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Precompiled vignette on CRAN
Hello, my package passes R CMD check without any warnings on my local machine (Mac OS), as well as on Uwe Ligges' Winbuilder. On RForge, however, we sometimes run into problems building the Sweave vignettes. Now here's my question: is it necessary for a CRAN submission that the Sweave vignettes can be compiled on CRAN, or is it possible to provide the (locally compiled) pdf vignette to be included in the package? Best, Felix __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Error on Windows build: unable to re-encode
Dear developers, while our package TripleR (hosted on R-Forge) builds well on Mac and Linux, the Windows build shows following error (http://r-forge.r-project.org/R/?group_id=418log=build_win32pkg=TripleRflavor=patched): Fri Feb 26 00:53:38 2010: Building binary for package TripleR (SVN revision NA) using R version 2.10.1 Patched (2010-02-24 r51172) ... * installing to library 'R:/R/lib/CRAN/2.10' * installing *source* package 'TripleR' ... Using auto-selected zip option '--use-zip-data' ** R Error : unable to re-encode 'RR.r' I found the piece of code producing the error in the function .install_package_code_files in the file src/library/tools/R/admin.R: ## assume that if locale is 'C' we can used 8-bit encodings unchanged. if(need_enc !(Sys.getlocale(LC_CTYPE) %in% c(C, POSIX))) { con - file(outFile, a) on.exit(close(con)) # Windows does not like files left open for(f in codeFiles) { tmp - iconv(readLines(f, warn = FALSE), from = enc, to = ) if(any(is.na(tmp))) stop(gettextf(unable to re-encode '%s', basename(f)), domain = NA, call. = FALSE) However, I don't really know what that means. I already tried to encode the source file both in UTF-8 and in latin-1, but neither worked. Did anyone encounter the same problem / any suggestion? Thanks a lot! Felix [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Error on Windows build: unable to re-encode
Thanks for your help - that was the solution (easy enough to remove these two characters - they've been in only comments anyway). Fortunately, the DECRIPTION file accepts umlauts, as in my second name. The problem was only in the source file. Felix Am 26.02.2010 um 18:37 schrieb Duncan Murdoch: On 26/02/2010 11:05 AM, Felix Schönbrodt wrote: Hi Duncan, I now declared the endcoding in the DESCRIPTION to UTF-8 (and all files are encoded in that way, too). As my last name is Schönbrodt, I'd be happy to see it that way in the package ;-) However, it still doesn't build on Windows (but works on Mac and Linux). Unfortunately I cannot build the Windows packages myself (I work on a Mac), but the win-builder by Uwe Ligges still shows the same error ... If declaring the encoding in DESCRIPTION doesn't solve the problem, I'd be happy to take a look at the package. That's a great offer! I'd be very happy if you could take a look. You can find the source at http://r-forge.r-project.org/projects/tripler/, a tar.gz is attached as well. I got the same error as you. It looks as though iconv has trouble with the way some characters are encoded in your file. For example, on line 893, you have a u-umlaut encoded as EF BF BD. According the the UTF-8 tables at http://www.utf8-chartable.de/unicode-utf8-table.pl?start=65280, that encodes a question mark in a diamond, REPLACEMENT CHARACTER. There's no corresponding character in the standard Windows latin1 encoding, so conversion fails. Firefox can display the funny question mark, but it doesn't display the u-umlaut as you intended, so I think this is an error in your file. A way to find all such errors is as follows: read the file as utf-8, then use the iconv() function in R to convert it to latin1. When I do that, I get NA on lines 893 and 953, which are displayed to me as [1] \t# im latenten Fall: die Error variance erst am Ende berechnen (d.h., alle error componenten �ber alle Gruppen mitteln, die unter NUll auf Null setzen, dann addieren) [2] \t\t# TODO: �berpr�fen! We might be able to make the error message in the package installer more informative (e.g. giving the line number that failed). I'll look into that. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel