Re: [Rd] dependencies on system packages

2011-02-04 Thread Claudia Beleites
Dear all, From the writing extensions manual: Other dependencies (external to the R system) should be listed in the ‘SystemRequirements’ field, possibly amplified in a separate README file. I guess one problem is the user may not realize that the -dev version is needed, and just sees libxml2

[Rd] Strange behaviour of read and writeBin

2011-02-04 Thread Christian Ruckert
To me it seems like writeBin() writes one char/byte more than expected. con - file(testbin, wb) writeBin(ttccggaa, con) close(con) con - file(testbin, rb) readBin(con, what=character) [1] ttccggaa seek(con, what=NA) [1] 9 close(con) con - file(testbin, rb) readBin(con, what=raw, n=20)

Re: [Rd] Strange behaviour of read and writeBin

2011-02-04 Thread Jeff Ryan
from ?seek ‘seek’ returns the current position (before any move), as a (numeric) byte offset from the origin, if relevant, or ‘0’ if not. Your string is nul terminated (9 bytes long). That would be the current offset. If you only read one byte, you'd have to be more than 0 bytes offset.

Re: [Rd] Strange behaviour of read and writeBin

2011-02-04 Thread Duncan Murdoch
On 04/02/2011 5:35 AM, Christian Ruckert wrote: To me it seems like writeBin() writes one char/byte more than expected. You want writeChar rather than writeBin to avoid the null termination of strings. Duncan Murdoch con- file(testbin, wb) writeBin(ttccggaa, con) close(con)

Re: [Rd] keep.source when semicolons separate statements on the one line

2011-02-04 Thread Duncan Murdoch
Thanks for the report. I'll take a look. I'm now past one major time sink, and will have some time to catch up on old problems; I'll add this to that list. Duncan Murdoch On 03/02/2011 7:09 PM, John Maindonald wrote: The following is 'semicolon.Rnw' \SweaveOpts{engine=R,

Re: [Rd] dependencies on system packages

2011-02-04 Thread Simon Urbanek
Claudia, thanks for you comments . On Feb 4, 2011, at 3:18 AM, Claudia Beleites wrote: Dear all, From the writing extensions manual: Other dependencies (external to the R system) should be listed in the ‘SystemRequirements’ field, possibly amplified in a separate README file. I guess

[Rd] terribly annoying bug with POSIXlt : one o'clock is midnight?

2011-02-04 Thread Joris Meys
Apparently, as.POSIXlt takes one o'clock as the start of the day : as.POSIXlt(0,origin=1970-01-01) [1] 1970-01-01 01:00:00 CET as.POSIXlt(0,origin=1970-01-01 00:00:00) [1] 1970-01-01 01:00:00 CET as.POSIXlt(0,origin=1970-01-01 23:59:59) [1] 1970-01-02 00:59:59 CET Cheers -- Joris Meys

Re: [Rd] terribly annoying bug with POSIXlt : one o'clock is midnight?

2011-02-04 Thread Joris Meys
Been too fast : I am in Central European Time (GMT +1), which explains the time conversion. Still, I find it highly annoying that as.POSIXlt assumes that the time is given in GMT and has to be converted to whatever timezone you're in if you don't specify anything. Probably this behaviour is not

Re: [Rd] terribly annoying bug with POSIXlt : one o'clock is midnight?

2011-02-04 Thread Gavin Simpson
On Fri, 2011-02-04 at 16:21 +0100, Joris Meys wrote: Apparently, as.POSIXlt takes one o'clock as the start of the day : as.POSIXlt(0,origin=1970-01-01) [1] 1970-01-01 01:00:00 CET as.POSIXlt(0,origin=1970-01-01 00:00:00) [1] 1970-01-01 01:00:00 CET as.POSIXlt(0,origin=1970-01-01

Re: [Rd] terribly annoying bug with POSIXlt : one o'clock is midnight?

2011-02-04 Thread Jeff Ryan
Much of TZ-hell (I almost dare say all) has been sorted through in xts. http://cran.r-project.org/web/packages/xts/index.html Peruse the sources for inspiration or just take some comfort in that you are not the only one ;-) Jeff On Fri, Feb 4, 2011 at 9:24 AM, Joris Meys jorism...@gmail.com

[Rd] axTicks.Rd documentation bug

2011-02-04 Thread Ben Bolker
?axTicks says: usr: numeric vector of length four, defaulting to ‘par(usr)’ giving horizontal (‘x’) and vertical (‘y’) user coordinate limits. but this is not how the function is implemented -- in fact 'usr' should be a vector of length two corresponding to the

[Rd] read.csv trap

2011-02-04 Thread Ben Bolker
This is not specifically a bug, but an (implicitly/obscurely) documented behavior of read.csv (or read.table with fill=TRUE) that can be quite dangerous/confusing for users. I would love to hear some discussion from other users and/or R-core about this ... As always, I apologize if I have

Re: [Rd] dependencies on system packages

2011-02-04 Thread Dirk Eddelbuettel
Simon, On 4 February 2011 at 10:01, Simon Urbanek wrote: | Claudia, | | thanks for you comments . | | On Feb 4, 2011, at 3:18 AM, Claudia Beleites wrote: | | Dear all, | | From the writing extensions manual: | Other dependencies (external to the R system) should be listed in the

Re: [Rd] dependencies on system packages

2011-02-04 Thread Ken.Williams
On 2/4/11 9:01 AM, Simon Urbanek simon.urba...@r-project.org wrote: I'd argue that if a user attempts to install a package from sources instead of using the distribution binaries, he should know what he's doing as there is much more involved (proper tools, usually a different library

Re: [Rd] dependencies on system packages

2011-02-04 Thread Simon Urbanek
On Feb 4, 2011, at 1:24 PM, Dirk Eddelbuettel wrote: Simon, On 4 February 2011 at 10:01, Simon Urbanek wrote: | Claudia, | | thanks for you comments . | | On Feb 4, 2011, at 3:18 AM, Claudia Beleites wrote: | | Dear all, | | From the writing extensions manual: | Other

Re: [Rd] dependencies on system packages

2011-02-04 Thread Ted Byers
From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On Behalf Of ken.willi...@thomsonreuters.com Sent: February-04-11 1:58 PM To: simon.urba...@r-project.org; cbelei...@units.it Cc: r-devel@r-project.org Subject: Re: [Rd] dependencies on system packages On 2/4/11 9:01 AM,

[Rd] matching symbols to objects

2011-02-04 Thread Patrick Leyshock
Hello, I'm trying to access an object, given only its name as a symbol. I cannot figure out how to proceed. Suppose I call substitute( ) on the expression 'x + 2': parse.tree - substitute(x + 2); The constituents of parse.tree are of type symbol and numeric: str(parse.tree[[1]]) symbol +

Re: [Rd] matching symbols to objects

2011-02-04 Thread Jeff Ryan
Patrick, Take a look at all.vars to start with That will return the vars as characters, from there you can use get to test/proceed. all.vars(parse.tree) [1] x Best, Jeff On Fri, Feb 4, 2011 at 1:37 PM, Patrick Leyshock ngkbr...@gmail.com wrote: Hello, I'm trying to access an object,

Re: [Rd] matching symbols to objects

2011-02-04 Thread Patrick Leyshock
There we go, thank you! On Fri, Feb 4, 2011 at 11:42 AM, Jeff Ryan jeff.a.r...@gmail.com wrote: Patrick, Take a look at all.vars to start with That will return the vars as characters, from there you can use get to test/proceed. all.vars(parse.tree) [1] x Best, Jeff On Fri, Feb

Re: [Rd] keep.source when semicolons separate statements on the one line

2011-02-04 Thread Kevin R. Coombes
This is probably the same underlying bug, but it is not caused by semicolons. If you use keep,soure=TRUE with expand=FALSE and interpolate a code chunk, the name of the chunkl is sent to the TeX file once for every line in the chunk. Specifically, the source file: %%%

Re: [Rd] matching symbols to objects

2011-02-04 Thread Patrick Leyshock
There we go, thank you! On Fri, Feb 4, 2011 at 11:42 AM, Jeff Ryan jeff.a.r...@gmail.com wrote: Patrick, Take a look at all.vars to start with That will return the vars as characters, from there you can use get to test/proceed. all.vars(parse.tree) [1] x Best, Jeff On Fri, Feb 4,

[Rd] Reading a specific file during R CMD check?

2011-02-04 Thread Spencer Graves
Hello, All: How can I obtain the location of an example data file in a package during R CMD check? I want to include sample raw data files in a package and have them read by a function in the package. It occurs to me to put such a file in \inst\rawdata and have examples find

Re: [Rd] Reading a specific file during R CMD check?

2011-02-04 Thread Hadley Wickham
Hi Spencer, I think one of the early phases of R CMD check is R CMD install - it installs the package into a special location so that it doesn't override existing installed packages, but still allows function to work exactly as if they were in an installed package. Hadley On Fri, Feb 4, 2011 at