Re: [R] numeric variables converted to character when recoding missingvalues

2006-06-24 Thread Juan Pablo Lewinger
Thanks Bert, that works of course and is much more straightforward than what I was trying. However, I'm still puzzled as to why x[x==99]-NA works (i.e. it replaces the 999s with NAs and keeps the numeric variables numeric) but is.na(x[x==999])-TRUE doesn't (it replaces the 999s with NAs but

Re: [R] Tetrachoric correlation in R vs. stata

2006-06-24 Thread John Fox
Dear Peter, Thanks for fielding the followup to this question -- I didn't see it until Saturday morning. Janet says that polychor() gives virtually the same ML and 2-step estimates, but (thinking about it) I believe that these should be identical within rounding error in the 2 x 2 case, and that

[R] data frame search

2006-06-24 Thread Bart Joosen
Hi, I want to make a data frame which contains the positions of some searched values in another data frame. Like: Dataframe 1: 1 2 3 4 1 2 3 4 2 3 4 1 2 3 4 2 4 1 2 3 2 3 4 1 Let's say I searched on 4, then Dataframe 2 should contain: x y 1 4 1 8 2 3 2 7 3 1 3 7 I

[R] Overlaying 2D kernel density plots on scatterplot matrix

2006-06-24 Thread Michael Hopkins
Hi all We are pretty new to R here and trying to achieve something that we believe is possible but it¹s not easy to work out how to do it. We are producing scatterplot matrices for e.g. 10 variables. What we would like to do is superimpose 2D kernel density estimators on top of each plot so

[R] Not able to save the work space

2006-06-24 Thread ahmad
Hello, I am trying to save my work space but I recieve the following message error in save.image(name), how can I overcome this problem? Ahmad A. Al-Mallahi Laboratory of Bioproduction Engineering Graduate School of Agriculture Hokkaido University Sapporo-Japan

[R] difference in results from R vs SPSS

2006-06-24 Thread Fiona Sammut
Hi all, 1. I am doing some data analysis using both R and SPSS, to get used to both software packages. I had performed linear regression in R and SPSS for a number of times before this last one and the resulting coefficient values always matched. However, this last data set I was analyzing

Re: [R] data frame search

2006-06-24 Thread Gabor Grothendieck
Try this: which(DF1 == 4, arr.ind = TRUE) On 6/24/06, Bart Joosen [EMAIL PROTECTED] wrote: Hi, I want to make a data frame which contains the positions of some searched values in another data frame. Like: Dataframe 1: 1 2 3 4 1 2 3 4 2 3 4 1 2 3 4 2 4 1 2 3 2 3 4

Re: [R] difference in results from R vs SPSS

2006-06-24 Thread Chuck Cleland
Fiona Sammut wrote: Hi all, 1. I am doing some data analysis using both R and SPSS, to get used to both software packages. I had performed linear regression in R and SPSS for a number of times before this last one and the resulting coefficient values always matched. However, this last

Re: [R] difference in results from R vs SPSS

2006-06-24 Thread Fiona Sammut
Thanks for the reply. The mistake in 1 resulted to be due to using a different number of decimal places in the data. As regards 2, will check it out again. Thanks again. Fiona Sammut wrote: Hi all, 1. I am doing some data analysis using both R and SPSS, to get used to both software

Re: [R] Not able to save the work space

2006-06-24 Thread Prof Brian Ripley
Unfortunately you have not told us what the message was, nor the R platform nor how you were trying to save the `work space'. The most likely explanation is that you do not have permission to write the image file. But we need a lot more details to be able to help you without excessive

Re: [R] Producing png plot in batch mode

2006-06-24 Thread vittorio
SorThanks for the reply!!!.ry for my being so lazy and thanks a lot for your kind replies. Well, I tried to install GDD under freebsd (this time I read cafrefully the package docs and checked if the required libgd and freetype2 were installed and they were) BUT there's something wrong

Re: [R] Problems creating packages.

2006-06-24 Thread Jay Emerson
I'm creating my own package for personal and I'm having trouble getting it to a point where R (v 2.3.1) will recognise it. I've followed two different tutorials for how to create the package structure and the DESCRIPTION file ( http://web.maths.unsw.edu.au/~wand/webcpdg/rpack.html ,

Re: [R] data frame search

2006-06-24 Thread Jay Emerson
I'll suggest an algorithm with a little code but haven't actually tried it. R loves vector/matrix operations (and, incidentally, you probably ought to be using matrices here and not data frames, particularly if the images are large). Here is your matrix from your example (I'll call this x) 1 2

[R] my poor post formatting in data frame search and Problems creating packages (a summary)

2006-06-24 Thread John W Emerson
I'm trying to figure out how to get my mail client (gmail) to interface more elegantly with the help list for submissions so they don't appear as attachments. Sorry about that. A quick summary: - Although I was pleased with my solution to Bart Joosen's query about data frames, Gabor's

[R] smoothing splines and degrees of freedom

2006-06-24 Thread Steven Shechter
Hi, If I set df=2 in my smooth.spline function, is that equivalent to running a linear regression through my data? It appears that df=# of data points gives the interpolating spline and that df = 2 gives the linear regression, but I just want to confirm this. Thank you, Steven

Re: [R] Producing png plot in batch mode

2006-06-24 Thread Prof Brian Ripley
The advice in the posting guide was to ask the package maintainer (Cc:ed here). Please report what he had to say, as it would be helpful to the rest of us. Note that the src/Makevars.in has # we need to add JNI specific stuff here ifdef DEBUG PKG_CFLAGS+=-DJGD_DEBUG endif which is

Re: [R] data frame search

2006-06-24 Thread Bart Joosen
Thanks, couldn't find this function, Best regards Bart - Original Message - From: Gabor Grothendieck [EMAIL PROTECTED] To: Bart Joosen [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Sent: Saturday, June 24, 2006 1:15 PM Subject: Re: [R] data frame search Try this: which(DF1 == 4,

[R] getting the smoother matrix from smooth.spline

2006-06-24 Thread Gregory Gentlemen
Can anyone tell me the trick for obtaining the smoother matrix from smooth.spline when there are non-unique values for x. I have the following code but, of course, it only works when all values of x are unique. ## get the smoother matrix (x having unique values smooth.matrix = function(x,

Re: [R] Producing png plot in batch mode - Problems compiling GDD

2006-06-24 Thread vittorio
Thanks again Prof Ripley. Under FreeBSD 6.1 I eliminated the three lines you suggested in Makevars.in and the package was compiled like a charm. Bye Vittorio Alle 16:28, sabato 24 giugno 2006, Prof Brian Ripley ha scritto: The advice in the posting guide was to ask the package maintainer

Re: [R] How to use mle or similar with integrate?

2006-06-24 Thread Spencer Graves
Could you use 'optim' directly? This won't return a nice object of class 'mle', but it will give you parameter estimates. If you want an object of class 'mle', have you worked through the examples in the help file? Also, are your arguments a and b are scalars?

Re: [R] Producing png plot in batch mode - Problems compiling GDD

2006-06-24 Thread vittorio
Alle 21:42, sabato 24 giugno 2006, vittorio ha scritto: Thanks again Prof Ripley. Under FreeBSD 6.1 I eliminated the three lines you suggested in Makevars.in and the package was compiled like a charm. Bye Vittorio Alle 16:28, sabato 24 giugno 2006, Prof Brian Ripley ha scritto: The

Re: [R] Producing png plot in batch mode

2006-06-24 Thread vittorio
Thanks again Prof Ripley. Under FreeBSD 6.1 I eliminated the three lines you suggested in Makevars.in and the package was compiled like a charm. Bye Vittorio Alle 16:28, sabato 24 giugno 2006, Prof Brian Ripley ha scritto: The advice in the posting guide was to ask the package maintainer

[R] R Reporting - PDF/HTML mature presentation quality package?

2006-06-24 Thread zubin
Hello, searching for the key packages so i can output, Text, Tables ,and Graphics into a HTML or PDF report - have R create these reports in an easy and efficient way without LaTeX - I have searched the R pages but don't see any mature packages - anyone have any advice on a easy to use R

[R] Rebuild private R package.

2006-06-24 Thread [EMAIL PROTECTED]
Hello! Suppose I have my own R-package with long src/ subdirectory. If I edit only one file from this directory what I have to do to make R recompile only this file and resulting *.so library but not the all other source files? It looks to me like the default behaviour has changed in R-2.3.1.

Re: [R] data frame search

2006-06-24 Thread Gabor Grothendieck
which is part of base R so look again. On 6/24/06, Bart Joosen [EMAIL PROTECTED] wrote: Thanks, couldn't find this function, Best regards Bart - Original Message - From: Gabor Grothendieck [EMAIL PROTECTED] To: Bart Joosen [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Sent:

Re: [R] R Reporting - PDF/HTML mature presentation quality package?

2006-06-24 Thread Frank E Harrell Jr
zubin wrote: Hello, searching for the key packages so i can output, Text, Tables ,and Graphics into a HTML or PDF report - have R create these reports in an easy and efficient way without LaTeX - I have searched the R pages but don't see any mature packages - anyone have any advice on a