Re: [Rd] Couldn't (and shouldn't) is.unsorted() be faster?

2008-04-17 Thread Prof Brian Ripley
On Thu, 17 Apr 2008, Herve Pages wrote: > Hi, > > Thanks for your answers! > > No need to change anything. In my case, 'x' is guaranteed to be an integer > vector with no NAs so I can call .Internal(is.unsorted(x)) directly. > > BTW, why not make is.unsorted() a little bit more prepared to silly u

Re: [Rd] R-extension in unix system -- help to locate header files

2008-04-17 Thread Prof Brian Ripley
You should never give full paths in #include statements. The search paths for include ('header') files are set by the compiler and supplemented by -I flags on the command line. If your C compiler is unable to find something is badly wrong, and you need to ask your 'unix' advisor for help. (B

[Rd] R-extension in unix system -- help to locate header files

2008-04-17 Thread Kyeongmi Cheon
Hi list, To call C, I used to use R-extension in windows but I'm moving to unix system because my PC doesn't have enough memory. My C codes requires to include the following header files: #include #include #include #include #include #include In windows, I had no problem with it because I s

Re: [Rd] Couldn't (and shouldn't) is.unsorted() be faster?

2008-04-17 Thread Herve Pages
Hi, Thanks for your answers! No need to change anything. In my case, 'x' is guaranteed to be an integer vector with no NAs so I can call .Internal(is.unsorted(x)) directly. BTW, why not make is.unsorted() a little bit more prepared to silly user input: > is.unsorted(c(2:5, NA), na.rm=NA)

Re: [Rd] Couldn't (and shouldn't) is.unsorted() be faster?

2008-04-17 Thread Prof Brian Ripley
I wouldn't say 'easy', and so I think we need a business case for this change. (One of the issues is that the internals are used elsewhere and optimized for inputs without NAs. So we would need to write separate code if we pass NAs down to C level. As I recall, is.unsorted was a cheap R inte

Re: [Rd] Couldn't (and shouldn't) is.unsorted() be faster?

2008-04-17 Thread Bill Dunlap
On Thu, 17 Apr 2008, Herve Pages wrote: > Couldn't is.unsorted() bail out immediately here (after comparing > the first 2 elements): > > > x <- 2000:1 > > system.time(is.unsorted(x), gcFirst=TRUE) > user system elapsed >0.084 0.040 0.124 > > > x <- 2:1 > > system.time(

[Rd] Couldn't (and shouldn't) is.unsorted() be faster?

2008-04-17 Thread Herve Pages
Hi, Couldn't is.unsorted() bail out immediately here (after comparing the first 2 elements): > x <- 2000:1 > system.time(is.unsorted(x), gcFirst=TRUE) user system elapsed 0.084 0.040 0.124 > x <- 2:1 > system.time(is.unsorted(x), gcFirst=TRUE) user system elapsed

Re: [Rd] [rd] sage <--> r integration

2008-04-17 Thread Rob Goedman
Mike, I'm also surprised so few reactions have been forthcoming. I saw William's email shortly after Jan's email about Sage. Having been involved in the Ryacas project (R to Yacas - Yet Another Computer Algebra System - with Gabor, Soren and Ayal), I believe in the tremendous benefits of s

Re: [Rd] Bug in ci.plot(HH Package) (PR#11163)

2008-04-17 Thread rmh
Thank you for the error report. I have made the correction which will be in HH_2.1-11 which will be posted in a few days. Rich __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] calculating multiregression for the given data

2008-04-17 Thread man4ish
i am trying to calculate the multi regression for the follwing data 0 1 2 3 7 5 0 4 4 3 0 3 4 5 4 0 5 4 5 4 0 1 1 0 1 0 1 1 1 0 1 0 4 5 6 1 2 3 2 1 keeping Ist column as dependent variable and other as independent varialbles,how can i do this using lm funciotn in stats please send me the code

[Rd] LinkingTo for 2 packages

2008-04-17 Thread Iago Mosqueira
Hello, One of our packages contains C++ code that needs to be compiled against 2 other packages. So the LinkingTo field in DESCRIPTION looks like this LinkingTo: FLCore,FLash Both packages are also in the Depends field. In R 2.6.2, first thing we noticed was that both names could not have any s

Re: [Rd] Suggestion: add a warning in the help-file of unique()

2008-04-17 Thread Ted Harding
On 17-Apr-08 10:44:32, Matthieu Stigler wrote: > Hello > > I'm sorry if this suggestion/correction was already made > but after a search in devel list I did not find any mention > of it. I would just suggest to add a warning or an exemple > for the help-file of the function unique() like > > "Not

[Rd] Suggestion: add a warning in the help-file of unique()

2008-04-17 Thread Matthieu Stigler
Hello I'm sorry if this suggestion/correction was already made but after a search in devel list I did not find any mention of it. I would just suggest to add a warning or an exemple for the help-file of the function unique() like "Note that unique() compares only identical values. Values which,

Re: [Rd] segments() with zero-length arguments (PR#11192)

2008-04-17 Thread Prof Brian Ripley
[Taken off R-bugs, at least for now.] On Thu, 17 Apr 2008, Peter Dalgaard wrote: [EMAIL PROTECTED] wrote: I think we should allow only all-zero arguments (at present any zero-length argument is an error), as per the R-level proposed code. arrows() and rect() share the code so it is much clean

[Rd] [rd] sage <--> r integration

2008-04-17 Thread Mike Hansen
I would like to re-emphasize the above points that William makes. Both projects could benefit a lot from working with each other. A fair number of people, including Persi Diaconis and Susan Holmes, have had enthusiastic responses when I mentioned that R was being included with Sage. This is a goo

Re: [Rd] segments() with zero-length arguments (PR#11192)

2008-04-17 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: > I think we should allow only all-zero arguments (at present any > zero-length argument is an error), as per the R-level proposed code. > > arrows() and rect() share the code so it is much cleaner to do this > internally. > > There are precedents for not requiring all

Re: [Rd] segments() with zero-length arguments (PR#11192)

2008-04-17 Thread ripley
I think we should allow only all-zero arguments (at present any zero-length argument is an error), as per the R-level proposed code. arrows() and rect() share the code so it is much cleaner to do this internally. Done for R-devel. On Thu, 17 Apr 2008, [EMAIL PROTECTED] wrote: > Uwe Ligges sug

[Rd] segments() with zero-length arguments (PR#11192)

2008-04-17 Thread rmh
Uwe Ligges suggested I post this on R-bugs as a wishlist item with a proposed patch. R considers zero-length arguments to segments() to be an error. I would like R to allow this and to return without an error. It occurs naturally in settings like valid <- c(FALSE, FALSE, FALSE) segments(x0[vali

[Rd] package.skeleton() creates corrupted Rd file (PR#11191)

2008-04-17 Thread pent
Calling package.skeleton() results in corrupted Rd-file stub on my system. It (the file) is contaminated with mass question marks. This happens only for package Rd file, Rd stubs for *package functions* are generated nicely. An example of bad Rd file created by package.skeleton(): \name{cmrutils