[R] combining dataframes with different numbers of columns

2006-11-07 Thread Denis Chabot
one or more variables that are absent from the wider one. If this was the case, I'd like the new variable to be present in the combined dataframe, with missing values given to the observations from the wider dataframe. Thanks in advance, Denis Chabot

Re: [R] combining dataframes with different numbers of columns

2006-11-07 Thread Denis Chabot
where the narrower dataframe contains one or more variables that are absent from the wider one. If this was the case, I'd like the new variable to be present in the combined dataframe, with missing values given to the observations from the wider dataframe. Thanks in advance, Denis

[R] distance between legend title and legend box

2006-10-26 Thread Denis Chabot
, but I think any device will show the box needs to be raised a bit (in quartz, the top of the box passes in the middle of the 2, in pdf it is acceptable, but just (the top of the box lightly touches the top of the 2). Sincerely, Denis Chabot __ R-help

[R] out.format for chron

2006-10-19 Thread Denis Chabot
Dear R users, Do you know of a way to precise an out.format for a chron object that would use numbers for months and yet 4 digits for the year? I have tried out.format=c(d-m-year) (note the m instead of either mon or month) but got 27-Feb-1992. Also, the help for chron tells us how to

Re: [R] out.format for chron

2006-10-19 Thread Denis Chabot
) with( month.day.year( x ), sprintf( %02.f-%02.f-%04.f, day, month, year) ) chron( 20, out.format = ddmm ) On 10/19/06, Denis Chabot [EMAIL PROTECTED] wrote: Dear R users, Do you know of a way to precise an out.format for a chron object that would use numbers for months and yet 4 digits

[R] functionality of update in SAS

2006-09-20 Thread Denis Chabot
for a dataframe of 5000 lines and 30 variables, I'd appreciate learning about it. But I'll already be thrilled if I can update whole lines at a time. Sincerely, Denis Chabot __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] merge gives me too many rows

2006-09-18 Thread Denis Chabot
=F. That is if I ever found a case where I had a line in the first dataframe with no match in the second, I'd want to keep that line in the final dataframe. Again, many thanks, Denis At 9:11 PM -0400 9/17/06, Denis Chabot wrote: Hi, I am using merge to add some variables to an existing

[R] merge gives me too many rows

2006-09-17 Thread Denis Chabot
with SAS to R... Please let me know if you want the file test3 (2.3 MB as a csv file, but only 352 KB in R (.rda) format). Sincerely, Denis Chabot R.Version() $platform [1] powerpc-apple-darwin8.6.0 $arch [1] powerpc $os [1] darwin8.6.0 $system [1] powerpc, darwin8.6.0 $status [1

Re: [R] reshaping a dataset

2006-09-13 Thread Denis Chabot
variables and display the result with the 6th, prey, along the top and the others along the side. library(reshape) testm - melt(test, id = 1:6) cast(testm, nbpc + trip + set + tagno + depth ~ prey) Now fix up the NAs. On 9/12/06, Denis Chabot [EMAIL PROTECTED] wrote: Hi, I'm trying

[R] reshaping a dataset

2006-09-12 Thread Denis Chabot
them (i.e. something else than reshape)? Thanking you in advance, Denis Chabot __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] transparent background for PDF

2006-03-25 Thread Denis Chabot
As far as I know, PowerPoint does not import pdfs. Without telling you it transforms it in a png. And it is not very smart about making a high res png at that. Maybe it is also not very clever about taking the transparent background into account? When I must use PowerPoint, I either

[R] legend in bubble plots made with symbols()

2006-03-18 Thread Denis Chabot
sure there is a way which I'm not aware of to draw a legend for a plot drawn with symbols()... Thanks in advance, Denis Chabot __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http

[R] predicted values in mgcv gam

2006-03-05 Thread Denis Chabot
to illustrate this. Was I wrong to believe that the fit and its confidence band should behave the same way on both scales? Thanks in advance, Denis Chabot ### library(mgcv) set.seed(0) n-400 sig-2 x0 - runif(n, 0, 1) x1 - runif(n, 0, 1) x2 - runif(n, 0, 1) x3 - runif(n, 0, 1) f0

[R] transforming data frame for use with persp

2006-02-13 Thread Denis Chabot
columns. Thanks for your help, Denis Chabot __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] plotting lines that break if data break

2006-02-07 Thread Denis Chabot
manipulate my data (which may or may not contain breaks, and the number of breaks can vary if there are breaks at all). Is there another command that works like lines but will break the line if the data series suffer an interruption? Sincerely, Denis Chabot

Re: [R] plotting lines that break if data break

2006-02-07 Thread Denis Chabot
already. Try this: plot(1:10, c(1:5,NA,7:10), type = l) plot(c(1:5,NA,7:10), 1:10, type = l) On 2/7/06, Denis Chabot [EMAIL PROTECTED] wrote: Hi, Sometimes data series (not necessarily time series) suffer breaks where data were expected, but not collected. Often the regular lines command

[R] how to extract predicted values from a quantreg fit?

2006-02-04 Thread Denis Chabot
newdata that would satisfy predict.qss1? Thanks in advance, Denis Chabot __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] how to control ticks in plots with yasp or xasp

2005-10-08 Thread Denis Chabot
at all. I know I can draw the axis and tick marks manually, but often this simple option would suffice if I could understand how to make it work. Thanks in advance, Denis Chabot __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman

Re: [R] how to control ticks in plots with yasp or xasp

2005-10-08 Thread Denis Chabot
: On Sat, 2005-10-08 at 09:28 -0400, Denis Chabot wrote: Hi, A few times I tried to control the number and position of tick marks in plots with the yasp or xasp parameters. For example, a y axis was drawn by default with tick marks at 0, 20, 40, 80 and 100. I tried to get tick marks

Re: [R] how to control ticks in plots with yasp or xasp

2005-10-08 Thread Denis Chabot
Hi Brian, Le 05-10-08 à 13:21, Prof Brian Ripley a écrit : On Sat, 8 Oct 2005, Denis Chabot wrote: Hi, sorry about the bad syntax, though the right syntax would not have worked either, according to your tests (Mark, Brian, Peter). It DOES work according to my tests! (Do give us

[R] testing non-linear component in mgcv:gam

2005-10-05 Thread Denis Chabot
, Denis Chabot __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] testing non-linear component in mgcv:gam

2005-10-05 Thread Denis Chabot
probably need to find the procedure that gives you a good test, rather than relying on what gam() gives you. Just my $0.02... Andy From: Denis Chabot Hi, I need further help with my GAMs. Most models I test are very obviously non-linear. Yet, to be on the safe side, I report

Re: [R] testing non-linear component in mgcv:gam

2005-10-05 Thread Denis Chabot
the output... Denis -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Denis Chabot Sent: Wednesday, October 05, 2005 8:22 AM To: r-help@stat.math.ethz.ch Subject: [R] testing non-linear component in mgcv:gam Hi, I need further help with my GAMs

Re: [R] testing non-linear component in mgcv:gam

2005-10-05 Thread Denis Chabot
Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Denis Chabot Sent: Wednesday, October 05, 2005 8:22 AM To: r-help@stat.math.ethz.ch Subject: [R

Re: [R] p-level in packages mgcv and gam

2005-10-02 Thread Denis Chabot
Thank you very much Henric, now I see! Denis Le 05-10-02 à 11:47, Henric Nilsson a écrit : This test concerns only the non-linear part of the term s(Number, 3). In order to simultaneously test both the linear and non-linear part, as mgcv::summary.gam does, you'd kyp1.1 - gam(Kyphosis ~

Re: [R] p-level in packages mgcv and gam

2005-09-29 Thread Denis Chabot
than 0.001, you can be confident. over 0.001, you have to check. 2) for difference between package gam and mgcv, i sent a mail about this The underlying algorithms are very different. HTH, Henric De : Liaw, Andy [EMAIL PROTECTED] Date : 28 septembre 2005 14:01:25 HAE À : 'Denis Chabot

Re: [R] p-level in packages mgcv and gam

2005-09-28 Thread Denis Chabot
all these you find that the mgcv plots are smoother than the gam plots, even the same df are used all the time. I am really confused now! Denis Début du message réexpédié : De : Denis Chabot [EMAIL PROTECTED] Date : 26 septembre 2005 12:25:04 HAE À : r-help@stat.math.ethz.ch Objet : p

Re: [R] p-level in packages mgcv and gam

2005-09-28 Thread Denis Chabot
Hi Yves, Le 05-09-28 à 11:05, Yves Magliulo a écrit : hi, i'll try to help you, i send a mail about this subject last week... and i did not have any response... Sorry, I did not see your message last week. I'm using gam from package mgcv. 1) How to interpret the significance of smooth

Re: [R] p-level in packages mgcv and gam

2005-09-28 Thread Denis Chabot
But what about another analogy, that of polynomials? You may not be sure what degree polynomial to use, and you have not decided before analysing your data. You fit different polynomials to your data, checking if added degrees increase r2 sufficiently by doing F-tests. I thought it was the

[R] p-level in packages mgcv and gam

2005-09-26 Thread Denis Chabot
, R. (1990) Generalized Additive Models are too technical for me. If someone knows a reference that explains how to choose model and link, i.e. what tests to run on your data before choosing, I would really appreciate it. Thanks in advance, Denis Chabot

[R] inconsistant decimal marker with write.table

2005-09-13 Thread Denis Chabot
, sometimes I get more than one variable with periods. It is frustrating. So let me know if you'd like the data file, Sincerely, Denis Chabot platform powerpc-apple-darwin7.9.0 arch powerpc os darwin7.9.0 system powerpc, darwin7.9.0 status major2 minor1.1 year 2005 month06 day

Re: [R] grep help needed

2005-07-26 Thread Denis Chabot
into PBSmapping to make it easier to import data from shapefiles! Thanks again for your help, Denis Chabot Le 05-07-26 à 00:48, Mulholland, Tom a écrit : -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Denis Chabot Sent: Tuesday, 26 July 2005 10:46 AM To: R

[R] grep help needed

2005-07-25 Thread Denis Chabot
) variable, i.e. all lines of a polygon must have the same ID, as in the example above (i.e. each time POS == 1, a new polygon starts and PID needs to be incremented by 1, and PID is kept constant for lines where POS ! 1). Any help will be much appreciated. Sincerely, Denis Chabot

Re: [R] PBSmapping and shapefiles

2005-07-22 Thread Denis Chabot
Hi, I got no reply to this: Le 16-Jul-05 à 2:42 PM, Denis Chabot a écrit : Hi, Is there a way, preferably with R, to read shapefiles and transform them in a format that I could then use with package PBSmapping? I have been able to read such files into R with maptools' read.shape

[R] PBSmapping and shapefiles

2005-07-16 Thread Denis Chabot
there. I also looked at the package shapefile, but it does not seem to do what I want either. Sincerely, Denis Chabot __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R

Re: [R] how to create a variable to rank within subgroups

2005-06-07 Thread Denis Chabot
Thank you very much Andy, this is exactly what I was looking for. I did not know this function. Sincerely, Denis Chabot Le 06 juin 2005 à 21:21, Liaw, Andy a écrit : Try something like: g - gl(4, 5) x - sample(20) d - data.frame(g, x) d g x 1 1 10 2 1 3 3 1 11 4 1 12 5 1 20 6

Re: [R] how to create a variable to rank within subgroups

2005-06-07 Thread Denis Chabot
I sure agree the name is not very helpful in guessing what it can do. May I suggest propagate? Denis Chabot Le 07 juin 2005 à 06:18, Peter Dalgaard a écrit : Denis Chabot [EMAIL PROTECTED] writes: Thank you very much Andy, this is exactly what I was looking for. I did not know

[R] how to create a variable to rank within subgroups

2005-06-06 Thread Denis Chabot
to five). So forth for each level of the grouping variable. I'm quite new with R and cannot figure out this one by myself. Thanks in advance, Denis Chabot __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Objet: [R] New user of R on Mac OS X - Please help

2005-03-13 Thread Denis Chabot
De: Depiereux Constant [EMAIL PROTECTED] Date: 12 mars 2005 09:44:08 GMT-05:00 À: r-help@stat.math.ethz.ch Objet: [R] New user of R on Mac OS X - Please help Brand new Mac OS X user, I am transfering my R stuffs from my windows machine. When porting some of my functions, I got messages such as

Rép : [R] Problem installing Hmisc

2005-02-08 Thread Denis Chabot
Hi, I do have it installed on 2 Macs as well (OS X 10.2.8 and 10.3.7) and what I need does work, however if you do the command check routine some problems will likely be revealed. At least there were problems for me. Denis Le 08 févr. 2005, à 12:23, [EMAIL PROTECTED] a écrit : De: Don

Rép : [R] 2 small problems: integer division and the nature of NA

2005-02-05 Thread Denis Chabot
point telling me the value of my response here. But R tells me the sum was zero in that cell! Was this behavior considered desirable when sum was built? If not, any hope it will be fixed? Sincerely, Denis Chabot __ R-help@stat.math.ethz.ch mailing list https

[R] 2 small problems: integer division and the nature of NA

2005-02-04 Thread Denis Chabot
expected the sum to be NA in such cases, as I do not have a single data point telling me the value of my response here. But R tells me the sum was zero in that cell! Was this behavior considered desirable when sum was built? If not, any hope it will be fixed? Sincerely, Denis Chabot

[R] recoding large number of categories (select in SAS)

2005-01-19 Thread Denis Chabot
preyGr= 1; end; *select; The number of transformations is usually much larger than this short example. What is the best way of doing this in R? Sincerely, Denis Chabot __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

RE: [R] subsetting like in SAS

2005-01-17 Thread Denis Chabot
I want to thank Petr Pikal, Robert Balshaw and Na Li for suggesting the use of unique or !duplicated on a subset of my data where unwanted variables have been removed. This worked perfectly. Denis Chabot On 13 Jan 2005 at 11:52, Denis Chabot wrote: Hi, Being in the process of translating some

[R] Re: labels attached to variable names

2005-01-09 Thread Denis Chabot
have an easy way to switch to these labels in plots? I fear this is not possible and one must enter this by hand as ylab and xlab when making plots. Thanks in advance, Denis Chabot __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman

[R] how to do by-processing using weighted.mean

2005-01-09 Thread Denis Chabot
. Is it possible in R? Thanks in advance, Denis Chabot __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] labels attached to variable names

2005-01-06 Thread Denis Chabot
when making plots. Thanks in advance, Denis Chabot --- Denis Chabot, Ph.D. Chercheur en bioénergétique Bioenergetics researcher Institut Maurice-Lamontagne Institut Maurice

[R] position of labels in vis.gam or persp

2005-01-06 Thread Denis Chabot
--- Denis Chabot, Ph.D. Chercheur en bioénergétique Bioenergetics researcher Institut Maurice-Lamontagne Institut Maurice-Lamontagne Pêches et Océans CanadaFisheries Oceans Canada CP