[R] symbol.C is now deprecated?

2006-12-02 Thread Wee-Jin Goh
Hello list, I have a function that I wrote in C to be called in R. I've done that using symbol.C, which is the method I came across on the internet. Now that it's supposed to be deprecated and can be removed in the next version of R (!!), what up-to-date method that replaces symbol.C?

Re: [R] Quadratic Optimization

2006-12-02 Thread Martin Maechler
SpG == Spencer Graves [EMAIL PROTECTED] on Fri, 01 Dec 2006 17:29:56 -0800 writes: SpG Unless I'm missing something, optimizing a linear SpG function with quadratic constraints is almost trivial SpG with Langrange multipliers. yes. Good point, let's hope we're not solving

[R] error using environment(f) - NULL

2006-12-02 Thread Carmen Meier
Hi To all, I found in the tread http://finzi.psych.upenn.edu/R/Rhelp02a/archive/46740.html the reply for / y - 3 / / f - function(x) y / / environment(f) - NULL / / f(1) /but this example (R 2.4.0) will cause an error: The use of the NULL environment is not longer possible (translated) The

Re: [R] error using environment(f) - NULL

2006-12-02 Thread Gabor Grothendieck
Try : environment(f) - baseenv() There is also emptyenv() depending on what you want. See ?baseenv On 12/2/06, Carmen Meier [EMAIL PROTECTED] wrote: Hi To all, I found in the tread http://finzi.psych.upenn.edu/R/Rhelp02a/archive/46740.html the reply for / y - 3 / / f - function(x) y

[R] Fwd: Urgent Help in Paste Command

2006-12-02 Thread Shubha Karanth
Hi Experts, I want to see my object as below: 'C:\Program Files\R\R-2.4.0\bin\Rgui.exe' So I use the paste command. None of the below is working. Could anyone help me on this? paste('C:\Program Files\R\R-2.4.0\bin\Rgui.exe') [1] 'C:Program FilesRR-2.4.0\binRgui.exe' paste('C:,\,Program

Re: [R] Is there a better way for inputing data manually?

2006-12-02 Thread Michael Dewey
At 04:40 02/12/2006, Duncan Murdoch wrote: On 12/1/2006 11:00 PM, Wei-Wei Guo wrote: Dear All, I have worked with R for some time. It's a great tool for data analysis. But it's too hard to inputing raw data manually with R (I don't mean importing data. R is good at importing data). Maybe it's

Re: [R] Fwd: Urgent Help in Paste Command

2006-12-02 Thread Gabor Grothendieck
Try this: x - readline() C:\Program Files\R\R-2.4.0\bin\Rgui.exe x [1] C:\\Program Files\\R\\R-2.4.0\\bin\\Rgui.exe You can also use readLines(clipboard) if you are trying to read in something from the clipboard. On 12/2/06, Shubha Karanth [EMAIL PROTECTED] wrote: Hi Experts, I

Re: [R] Fwd: Urgent Help in Paste Command

2006-12-02 Thread Shubha Vishwanath Karanth
But when I do this I need x value to be C:\Program Files\R\R-2.4.0\bin\Rgui.exe and not C:\\Program Files\\R\\R-2.4.0\\bin\\Rgui.exe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gabor Grothendieck Sent: Saturday, December 02, 2006 5:21 PM To: Shubha

Re: [R] Fwd: Urgent Help in Paste Command

2006-12-02 Thread Gabor Grothendieck
x is the value you asked for. I think you are confusing its printed representation with its value. Try cat(x) and strsplit(x, ) On 12/2/06, Shubha Vishwanath Karanth [EMAIL PROTECTED] wrote: But when I do this I need x value to be C:\Program Files\R\R-2.4.0\bin\Rgui.exe and not C:\\Program

Re: [R] Fwd: Urgent Help in Paste Command

2006-12-02 Thread Shubha Vishwanath Karanth
O yaa... Thank you so much... From: jim holtman [mailto:[EMAIL PROTECTED] Sent: Saturday, December 02, 2006 5:58 PM To: Shubha Vishwanath Karanth Subject: Re: [R] Fwd: Urgent Help in Paste Command It is fine since '\' is used to escape characters (like '

Re: [R] Fwd: Urgent Help in Paste Command

2006-12-02 Thread Shubha Vishwanath Karanth
O yaa... Thank you so much... -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Saturday, December 02, 2006 5:56 PM To: Shubha Vishwanath Karanth Cc: Shubha Karanth; r-help@stat.math.ethz.ch Subject: Re: [R] Fwd: Urgent Help in Paste Command x is the value you

Re: [R] Quadratic Optimization

2006-12-02 Thread Prof Brian Ripley
On Sat, 2 Dec 2006, Martin Maechler wrote: SpG == Spencer Graves [EMAIL PROTECTED] on Fri, 01 Dec 2006 17:29:56 -0800 writes: SpG Unless I'm missing something, optimizing a linear SpG function with quadratic constraints is almost trivial SpG with Langrange multipliers.

Re: [R] symbol.C is now deprecated?

2006-12-02 Thread Duncan Murdoch
On 12/2/2006 4:04 AM, Wee-Jin Goh wrote: Hello list, I have a function that I wrote in C to be called in R. I've done that using symbol.C, which is the method I came across on the internet. Now that it's supposed to be deprecated and can be removed in the next version of R (!!), what

Re: [R] newbie: new_data_frame - selected set of rows

2006-12-02 Thread Philipp Pagel
Hi! distances - order(distancevector(scaled_DB, scaled_DB['query',], d=euclid)) Just compute the distances WITHOUT ordering, here. And then 1) create a small top_five frame top = scaled_DB[rank(distances)=5, ] rank() is better for this than order() in case there are ties. 2)

[R] Trouble passing arrays to C code

2006-12-02 Thread Wee-Jin Goh
Hello, I'm having more trouble with interfacing with C code. I have a function in C that will return the result of its computation as 3 arrays. The signature of the function is as follows: void lorenz_run(double x0, double y0, double z0, double h, int steps,

[R] Trouble passing arrays to C code

2006-12-02 Thread Antonio, Fabio Di Narzo
2006/12/2, Wee-Jin Goh [EMAIL PROTECTED]: Hello, I'm having more trouble with interfacing with C code. I have a function in C that will return the result of its computation as 3 arrays. The signature of the function is as follows: void lorenz_run(double x0, double y0, double z0, double h,

[R] Chi-squared approximation may be incorrect in: chisq.test(x)

2006-12-02 Thread Ethan Johnsons
I am getting Chi-squared approximation may be incorrect in: chisq.test(x) with the data bleow. Frequency distribution of number of male offspring in families of size 5. Number of Male OffspringN 0 518 12245 2

Re: [R] specify point shape for ggplot (equivalent to pch)?

2006-12-02 Thread John Kane
--- Rainer M Krug [EMAIL PROTECTED] wrote: Hi is it possible to specify the shape of the point to be used in ggplot (as with pch in plot)? I couldn't find anything in the help. Thanks Rainer I was looking for that the other day while just poking around with ggplot and did not see

Re: [R] specify point shape for ggplot (equivalent to pch)?

2006-12-02 Thread Gabor Grothendieck
See the last example in ?qplot On 12/1/06, Rainer M Krug [EMAIL PROTECTED] wrote: Hi is it possible to specify the shape of the point to be used in ggplot (as with pch in plot)? I couldn't find anything in the help. Thanks Rainer -- Rainer M. Krug, Dipl. Phys. (Germany), MSc

Re: [R] memory problem [cluster]

2006-12-02 Thread Dylan Beaudette
Hi Stephano, Looks like you used my example verbatim (http://casoilresource.lawr.ucdavis.edu/drupal/node/221) :) While my approach has not *yet* been published, the original source [4] by Roger Bivand certainly has. Just a reminder. That said, I would highly recommend reading up on the

Re: [R] Chi-squared approximation may be incorrect in: chisq.tes

2006-12-02 Thread Ted Harding
On 02-Dec-06 Ethan Johnsons wrote: I am getting Chi-squared approximation may be incorrect in: chisq.test(x) with the data bleow. Frequency distribution of number of male offspring in families of size 5. Number of Male Offspring N 0 518 1

Re: [R] Trouble passing arrays to C code

2006-12-02 Thread Wee-Jin Goh
Thank you!!! That was the problem and now it's solved. Thanks for providing a fresh pair of eyes. Regards, Wee-Jin On 2 Dec 2006, at 15:17, Antonio, Fabio Di Narzo wrote: here 'steps' is double, was integer in 'lorenz_run'. -- Antonio, Fabio Di Narzo Ph.D. student at Department of

Re: [R] Quadratic Optimization

2006-12-02 Thread Spencer Graves
Hi, Prof. Ripley: snip But that is a single equality quadratic constraint, and I believe 'quadratic constraints' (note, plural) conventionally means multiple inequality constraints. That meaning is a hard problem that needs specialized software (most likely using interior-point

Re: [R] package installation fails only for sp

2006-12-02 Thread Don McKenzie
Thanks to Brian Ripley and Roger Bivand for their quick replies to my question (original post below). Both politely pointed out that I had failed to check if I was running the latest version of R (2.4). I was attempting to download the current version of the sp package, which is not

[R] nonlinear quantile regression

2006-12-02 Thread Ricardo Bessa
Hello, I’m with a problem in using nonlinear quantile regression, the function nlrq. I want to do a quantile regression o nonlinear function in the form a*log(x)-b, the coefficients “a” and “b” is my objective. I try to use the command: funx - function(x,a,b){ res - a*log(x)-b res } Dat.nlrq

Re: [R] nonlinear quantile regression

2006-12-02 Thread roger koenker
This isn't a nonlinear QR problem. You can write: f - rq(y ~ log(x), data=Dat, tau=0.25) which corresponds to the model Q_y (.25|x) = a log(x) + b note the sign convention on b. url:www.econ.uiuc.edu/~rogerRoger Koenker email [EMAIL PROTECTED]

[R] Problem with CH.test in uroot package

2006-12-02 Thread hassen62
Dear friends, I installed the package “uroot” then I wrote library (uroot) and I entered a series entitled extp, in spite of that the problem persite. In short,here are what I wrote and the message that I obtained: library(uroot)

Re: [R] memeory problem?!

2006-12-02 Thread massimodisasha
hi to all, frustated for this error, to day i buy a 1 GB memory slot for my laptop now it have 1,28GB instead the old 512, but i've the same error :-( damn!damn!how can i do? repeat for a little area (about 20X20 km and res=20m) it work fine! have you any suggestion? is ther a method for look

Re: [R] Quadratic Optimization

2006-12-02 Thread amit soni
Thanks for the suggestions. I have started using R just a few days back. So i thought I might be missing something and its better to clarify. I was actually looking for a direct command(like fmincon in Matlab or NMinimize in Mathematica) which can solve non linear problems straightaway

Re: [R] memory problem [cluster]

2006-12-02 Thread Roger Bivand
On Sat, 2 Dec 2006, Dylan Beaudette wrote: Hi Stephano, Looks like you used my example verbatim (http://casoilresource.lawr.ucdavis.edu/drupal/node/221) :) From exchanges on R-sig-geo, I believe the original questioner is feeding NAs to clara, and the error message in clara() is overrunning

[R] Force square crosstabulation

2006-12-02 Thread Manuel Morales
Hello list members, I'm looking for a way to force the results of a crosstabulation to be square - that is, to include 0 values. For example: table(letters[1:4],letters[c(1:3,3)]) yields: a b c a 1 0 0 b 0 1 0 c 0 0 1 d 0 0 1 I would like to return: a b c d a 1 0 0 0 b 0 1

Re: [R] Force square crosstabulation

2006-12-02 Thread Duncan Murdoch
On 12/2/2006 8:26 PM, Manuel Morales wrote: Hello list members, I'm looking for a way to force the results of a crosstabulation to be square - that is, to include 0 values. For example: table(letters[1:4],letters[c(1:3,3)]) yields: a b c a 1 0 0 b 0 1 0 c 0 0 1 d 0 0

Re: [R] Force square crosstabulation

2006-12-02 Thread Bill.Venables
Use factors with specified levels. lev - letters[1:4] table(factor(letters[1:4], levels = lev), factor(letters[c(1:3,3)], levels = lev)) a b c d a 1 0 0 0 b 0 1 0 0 c 0 0 1 0 d 0 0 1 0 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On

[R] prop.trend.test issue

2006-12-02 Thread Ethan Johnsons
I have the clinical study data. Year 0 Year 3 Retinol (nmol/L)N Mean +-sd Mean +-sd Vitamin A group 73 1.89+-0.36 2.06+-0.53 Trace group57 1.83+-0.31 1.78+-0.30 where N is the number