Re: [Rd] Call C code from R

2007-09-17 Thread Prof Brian Ripley
On Mon, 17 Sep 2007, ? ?. ??? wrote: Hello, All! I'm new for R-devel list. And I'd like to ask some questions, maybe they will be stuped for the most part of members of the list. I need to call function which is written in C++ from R. Your subject line says C My questions

Re: [Rd] Call C code from R

2007-09-17 Thread Oleg Sklyar
1) You include libraries just like you would always do. Here is the example from my package that uses external libraries of ImageMagick and GTK, standard libraries (stdio, pthread) and R libraries: #include R.h #include Rdefines.h #include R_ext/Rdynload.h #include R_ext/Error.h #include

Re: [Rd] (PR#9896) read.spss converts string variables with

2007-09-17 Thread Prof Brian Ripley
The problem here is that the values in the data do not have trailing blanks, and the corresponding values in the label table do. That's an issue about the specific SPSS file, not mentioned in this report. Take a look at the data read with use.value.labels=FALSE: read.spss(problem_file.sav,

Re: [Rd] R-2.6.0 for Windows, semi-transparent colours and layout()

2007-09-17 Thread Prof Brian Ripley
On Sat, 15 Sep 2007, Henric Nilsson (Public) wrote: Hi, The added support for semi-transparent colours in `windows' under R-2.6.0 for Windows is much appreciated. However, I've discovered that issuing a `layout' (or `par' with arguments `mfcol'/`mfrow') call and then trying to plot several

[Rd] *.Rd file: space after topic in \alias{topic } should be ignored (PR#9914)

2007-09-17 Thread bill
Full_Name: Bill Dunlap Version: R version 2.6.0 Under development (unstable) (2007-07-26 r42329) OS: Linux Submission from: (NULL) (24.16.101.199) If a *.Rd file has an \alias{topic } with a space between 'topic' and the closing '}' then the space is copied to the help/AnIndex file and

Re: [Rd] *.Rd file: space after topic in \alias{topic } should be (PR#9915)

2007-09-17 Thread bill
On Mon, 17 Sep 2007 [EMAIL PROTECTED] wrote: Full_Name: Bill Dunlap Version: R version 2.6.0 Under development (unstable) (2007-07-26 r42329) OS: Linux Submission from: (NULL) (24.16.101.199) If a *.Rd file has an \alias{topic } with a space between 'topic' and the closing '}' then the

Re: [Rd] Date vs date (long)

2007-09-17 Thread Peter Dalgaard
Terry Therneau wrote: b. I'd advise against numeric operation on difftime objects in general, because of the unspecified units. If I carry this idea forward, the R should insist that I specify units for any variable that corresponds to a physical quantity, e.g. height or weight, so that

Re: [Rd] Date vs date (long)

2007-09-17 Thread Gabor Grothendieck
On 9/17/07, Terry Therneau [EMAIL PROTECTED] wrote: Gabor Grothendieck as.Date(10) You can define as.Date.numeric in your package and then it will work. zoo has done that. library(zoo) as.Date(10) This is also a nice idea. Although adding to a package is possible, it is now very hard

[Rd] Re-attaching a package environment drops the attributes

2007-09-17 Thread Henrik Bengtsson
Hi. contrary to other environments, the attributes of a *package* environment are dropped (from the new environment) when attach():ing it to the search() path. This might or might not be surprising, but have some side effects if rearranging/attaching package environments. # Example - Regular