[R] Issue of reproducibility with gam and lm.wfit in different versions of R

2017-10-23 Thread Sebastien Bihorel
object in R 3.3.2 while a valid model has been identified? Looking at the source of step.gam, the line 157 (if(is.null(form.list)) break) seems to be the reason the function breaks out and returns a NULL value. I thank you in advance for your time. Sebastien Bihorel library(gam) dat

[R] Equivalent of gtools::mixedsort in R base

2018-03-11 Thread Sebastien Bihorel
Hi, Searching for functions that would order strings that mix characters and numbers in a "natural" way (ie, "a1 a2 a10" instead of "a1 a10 a2"), I found the mixedsort and mixedorder from the gtools package. Problems: 1- mixedorder does not work in a "do.call(mixedorder, mydataframe)" call lik

Re: [R] Equivalent of gtools::mixedsort in R base

2018-03-12 Thread Sebastien Bihorel
So I take this is a no to my initial question. Cheers too. PS: some users just ask questions to get straight answers not to get a solution to their problem :D From: "Bert Gunter" To: "Sebastien Bihorel" Cc: "R-help" Sent: Monday, March 12, 201

Re: [R] Equivalent of gtools::mixedsort in R base

2018-03-12 Thread Sebastien Bihorel
Hi, Point taken... although this error is not returned in older version of R (3.1.2 does not have any issue with your test case... not sure when the added layer of check was introduced). From: "William Dunlap" To: "Sebastien Bihorel" Cc: r-help@r-project.org Se

Re: [R] Equivalent of gtools::mixedsort in R base

2018-03-12 Thread Sebastien Bihorel
Thanks for your reply. I take this is also a no to my question and appreciated the suggested mixedrank function and its usage with do.call. Thanks - Original Message - From: "Jeff Newmiller" To: "Bert Gunter" Cc: "Sebastien Bihorel" , "R-help"

Re: [R] Equivalent of gtools::mixedsort in R base

2018-03-13 Thread Sebastien Bihorel
Thanks. - Original Message - From: "Gabor Grothendieck" To: "Sebastien Bihorel" Cc: r-help@r-project.org Sent: Monday, March 12, 2018 3:49:10 PM Subject: Re: [R] Equivalent of gtools::mixedsort in R base split any mixed columns into letter and number columns and th

[R] Question about subset

2018-04-08 Thread Sebastien Bihorel
Hi, The help page for subset states "subset: logical expression indicating elements or rows to keep: missing values are taken as false." Before I try to re-invent the wheel, I would like to know if one of the base or recommended packages would contain a variant of the subset function that would

Re: [R] Question about subset

2018-04-10 Thread Sebastien Bihorel
(parse(text=cond2)))) x yz 1 1 a TRUE 3 NA a TRUE - Original Message - From: "S Ellison" To: "Sebastien Bihorel" Sent: Monday, April 9, 2018 8:31:55 AM Subject: RE: Question about subset > Before I try to re-invent the wheel, I would like to know if one

Re: [R] Question about subset

2018-04-10 Thread Sebastien Bihorel
Thanks. S. Elison provided a similar but apparently more general solution (see other post in thread). - Original Message - From: "David Winsemius" To: "Sebastien Bihorel" Cc: r-help@r-project.org Sent: Monday, April 9, 2018 12:33:41 AM Subject: Re: [R] Questio

[R] Calling the curve function with a character object converted into an expression

2018-05-02 Thread Sebastien Bihorel
Hi, Down a cascade of function calls, I want to use the curve function with an expression that is a variable. For various reason, this variable must be a character object and cannot be an expression as required by the curve function. How do I convert my variable into a expression that is accep

Re: [R] Calling the curve function with a character object converted into an expression

2018-05-03 Thread Sebastien Bihorel
arsed text. > > *** I would appreciate any wiser R programmers correcting any > misunderstanding or error in my explanation *** > > Cheers, > Bert > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into

[R] Porbably bug in panel.abline

2018-06-18 Thread Sebastien Bihorel
Hi, I recently encountered situations in which reference lines are not drawn with the lattice panel.abline function. Please, consider the following example code: require(lattice) a <- runif(1,0,100) data <- data.frame(x=c(0,a^2), y=c(0,a^2)) xyplot( y~x, data = data, type = 'l', pan

Re: [R] Porbably bug in panel.abline

2018-06-18 Thread Sebastien Bihorel
No, the intercept a^2 f the abline is exactly the upper limit of the data, so it is in the range. From: "Bert Gunter" To: "Sebastien Bihorel" Cc: "R-help" Sent: Monday, June 18, 2018 2:28:21 PM Subject: Re: [R] Porbably bug in panel.abline Note that

Re: [R] Porbably bug in panel.abline

2018-06-18 Thread Sebastien Bihorel
Paul Murrell posted some comments on [ https://github.com/deepayan/lattice/issues/8 | https://github.com/deepayan/lattice/issues/8 ] - Original Message - From: "Bert Gunter" To: "Sebastien Bihorel" Cc: "R-help" Sent: Monday, June 18, 2018 4:15:29 PM Su

[R] Question about function scope

2018-10-30 Thread Sebastien Bihorel
Hi, >From the R user manual, I have a basic understanding of the scope of function >evaluation but have a harder time understanding how to mess with environments. My problem can be summarized by the code shown at the bottom: - the foo function performs some steps including the assignment of defa

Re: [R] Question about function scope

2018-10-30 Thread Sebastien Bihorel
. - Original Message - From: "Duncan Murdoch" To: "Sebastien Bihorel" , r-help@r-project.org Sent: Tuesday, October 30, 2018 4:13:05 PM Subject: Re: [R] Question about function scope On 30/10/2018 3:56 PM, Sebastien Bihorel wrote: > Hi, > > From the R user manual, I

Re: [R] Question about function scope

2018-10-30 Thread Sebastien Bihorel
That's cool! I think this solution would fit better with what my intended setup. Thanks a lot - Original Message - From: "Duncan Murdoch" To: "Sebastien Bihorel" , r-help@r-project.org Sent: Tuesday, October 30, 2018 4:18:51 PM Subject: Re: [R] Question abo

Re: [R] Question about function scope

2018-10-30 Thread Sebastien Bihorel
Thanks a lot Eric, I think you are on the same page as Duncan (at least with his 2nd option). I will definitively explore this. From: "Eric Berger" To: "Duncan Murdoch" Cc: "Sebastien Bihorel" , "R mailing list" Sent: Tuesday, October 30, 20

[R] Encoding issue

2018-11-05 Thread Sebastien Bihorel
Hi, I am having problems getting similar output when processing the same markdown files on 2 different Linux systems (one is a laptop with Linux Mint 18.3, the other is a production server running on CentOS 7). I think this boils down to an encoding issue but I am not sure if this is a system-w

Re: [R] Encoding issue

2018-11-05 Thread Sebastien Bihorel
astien - Original Message ----- From: "Ivan Krylov" To: "Sebastien Bihorel" Cc: r-help@r-project.org Sent: Monday, November 5, 2018 2:34:02 PM Subject: Re: [R] Encoding issue On Mon, 5 Nov 2018 08:36:13 -0500 (EST) Sebastien Bihorel wrote: > [1] "râs" Interesting

[R] Diff'ing 2 strings

2019-01-05 Thread Sebastien Bihorel
Hi, Does R include an equivalent of the linux diff command? Ideally I would like to diff 2 fairly complex strings and extract the differences without having to save them on disk and using a system('diff file1 file2') command. Thanks Sebastien __ R-

Re: [R] Diff'ing 2 strings

2019-01-09 Thread Sebastien Bihorel
f command which is smart enough to recognize these line chunks you mentioned and not just to a simple line-by-line comparison. I saw a few thread mentioning ?adist. I will look into that. Sebastien From: "Bert Gunter" To: "Sebastien Bihorel" Cc: "R-help" Sen

Re: [R] Diff'ing 2 strings

2019-01-10 Thread Sebastien Bihorel
>From which the diffobj package? From: "Martin Møller Skarbiniks Pedersen" To: "Sebastien Bihorel" Cc: "R mailing list" Sent: Thursday, January 10, 2019 2:35:15 AM Subject: Re: [R] Diff'ing 2 strings On Sat, Jan 5, 2019, 14:58 Sebast

Re: [R] Diff'ing 2 strings

2019-01-10 Thread Sebastien Bihorel
org, "Sebastien Bihorel" , "Martin Møller Skarbiniks Pedersen" Cc: "R mailing list" Sent: Thursday, January 10, 2019 10:49:15 AM Subject: Re: [R] Diff'ing 2 strings Just type ?Rdiff it is in the preinstalled packages that come with R. On January 10, 201

Re: [R] Diff'ing 2 strings

2019-01-10 Thread Sebastien Bihorel
Thanks for the clarification. - Original Message - From: "Duncan Murdoch" To: "Sebastien Bihorel" , "Jeff Newmiller" Cc: r-help@r-project.org Sent: Thursday, January 10, 2019 11:43:14 AM Subject: Re: [R] Diff'ing 2 strings On 10/01/2019 11:38 a.m.

[R] Stratifying data with xyplot

2019-03-11 Thread Sebastien Bihorel
Hi, I am a big user/fan of the lattice package for plotting. As far as I know, lattice only offers one method to stratify data within a xyplot panel, using the groups arguments. A contrario, the ggplot package allow users to use different variables for coloring, setting the symbols, the line

[R] How to list recursive package dependency prior to installation/upgrade of a package

2019-03-14 Thread Sebastien Bihorel
Hi Is there an elegant way to recursive list all dependencies of a package prior to its installation or upgrade? I am particularly interested in finding which of the packages currently installed in my test/production environment would require an upgrade prior to actual installation/upgrade of

Re: [R] How to list recursive package dependency prior to installation/upgrade of a package

2019-03-14 Thread Sebastien Bihorel
That is great! Is there a way to know version required in the dependent packages? From: "William Dunlap" To: "Sebastien Bihorel" Cc: r-help@r-project.org Sent: Thursday, March 14, 2019 3:50:58 PM Subject: Re: [R] How to list recursive package dependency prior to ins

[R] Can one perform a dry run of a package installation?

2019-04-09 Thread Sebastien Bihorel
Hi, Is there a way to do a dry run of install.packages() or update.packages() to simulate how an R environment would be modified by the installation or update of a particular set of packages (with their dependencies)? I am particularly interested in finding how dependencies would be recursivel

Re: [R] Can one perform a dry run of a package installation?

2019-04-10 Thread Sebastien Bihorel
Thanks - Original Message - From: "Duncan Murdoch" To: "Sebastien Bihorel" , r-help@r-project.org Sent: Tuesday, April 9, 2019 7:29:50 PM Subject: Re: [R] Can one perform a dry run of a package installation? On 09/04/2019 5:46 p.m., Sebastien Bihorel wrote: > Hi,

[R] Vertical boxplot with a continuous X axis

2017-02-23 Thread Sebastien Bihorel
Hi, Can the boxplot design illustrated in the post (http://stackoverflow.com/questions/39849459/how-to-create-boxplots-with-a-continuous-x-axis-in-r) be reproduced with lattice or a lattice-derived function? Thank you Sebastien __ R-help@r-project.

Re: [R] Vertical boxplot with a continuous X axis

2017-02-24 Thread Sebastien Bihorel
Thanks for your reply - Original Message - From: "Bert Gunter" To: "Sebastien Bihorel" Cc: "R-help" Sent: Friday, February 24, 2017 2:01:36 AM Subject: Re: [R] Vertical boxplot with a continuous X axis Sebastien: The linked post is unclear: two of

Re: [R] Vertical boxplot with a continuous X axis

2017-02-24 Thread Sebastien Bihorel
Thanks for your reply - Original Message - From: "Richard M. Heiberger" To: "Sebastien Bihorel" Cc: "r-help" Sent: Friday, February 24, 2017 1:10:44 AM Subject: Re: [R] Vertical boxplot with a continuous X axis Yes, this is e

[R] Reshaping from long to wide with duplicate idvar and timevar

2017-03-13 Thread Sebastien Bihorel
Hi, I would like to reshape a data.frame from long to wide format. However, the reshape function does not seem to accept data containing rows with duplicate idvar and timevar. Building upon the ?reshape example: summary(Indometh) wide <- reshape(Indometh, v.names = "conc", idvar = "Subject",

[R] Problem with passing a string to subset

2009-08-21 Thread Sebastien Bihorel
Dear R-users, The following question bothered me for the whole afternoon: how can one pass a string as the conditioning argument to subset? I tried plain mystr, eval(mystr), expression(mystr), etc... I don't to be able to find the correct syntax > foo <- data.frame(a=1:10,b=10:1,c=rep(1:2,5)

Re: [R] Problem with passing a string to subset

2009-08-24 Thread Sebastien Bihorel
nd<- quote(c==1) subset(foo, eval(bquote(.(mycond))) ) HTH, baptiste 2009/8/21 Sebastien Bihorel : Dear R-users, The following question bothered me for the whole afternoon: how can one pass a string as the conditioning argument to subset? I tried plain mystr, eval(mystr), expression(mystr),

[R] combining grid.text, expression and variables

2009-09-02 Thread Sebastien Bihorel
Dear R-users, I am trying to use the grid.text and expression functions to display several character strings and plotmath text on a viewport. Some strings can include a variable portion (PI.limits in the following example), which I thought could be implemented by combining the bquote and the

Re: [R] combining grid.text, expression and variables

2009-09-02 Thread Sebastien Bihorel
it(1,"lines")) grid.text(eval(lab[2]), x=0.5, y=unit(1,"npc")-unit(2,"lines")) grid.text(eval(lab[3]), x=0.5, y=unit(1,"npc")-unit(3,"lines")) grid.text(lab[4], x=0.5, y=unit(1,"npc")-unit(4,"lines")) My preference goes for the

[R] Regular expression problem

2009-09-15 Thread Sebastien Bihorel
Dear R-users, I am trying to use the grep function to test whether a particular string is of the form "n.../mydir/myfile.mytype.myext". Anything between n and mytype could vary, and anything after mytype could vary. I tried to proceed by steps to build my regular expression... but I do not rea

Re: [R] Regular expression problem

2009-09-15 Thread Sebastien . Bihorel
ss with a period. '.*' match zero, or >> more, characters. > > Perhaps the OP wants > > grep("n[.].*mytype",mystr) > > to insist that ``mystr'' contain the string ``n.'' (literal ``.'') > somewhere before the string ``mytype&#x

[R] Adjust lattice graph axis label on final page

2010-02-24 Thread Sebastien Bihorel
Dear R-users, I was wondering if there was a way to adjust the placement of the axis titles for the last page of a multi-page lattice plot (see example below). Depending on the total number of panels, the placement of these titles might look strange on the last page, if the layout is not adju

Re: [R] Adjust lattice graph axis label on final page

2010-02-26 Thread Sebastien Bihorel
Sarkar wrote: On Thu, Feb 25, 2010 at 3:45 AM, Sebastien Bihorel wrote: Dear R-users, I was wondering if there was a way to adjust the placement of the axis titles for the last page of a multi-page lattice plot (see example below). Depending on the total number of panels, the placement of these

[R] Passing expression as argument to do.call

2009-07-02 Thread Sebastien Bihorel
Dear R-users, I would like to know how expressions could be passed as arguments to do.call functions. As illustrated in the short example below, concatenating lists objects and an expression creates an expression object, which is not an acceptable argument for do.call. Is there a way to avoid

Re: [R] Passing expression as argument to do.call

2009-07-02 Thread Sebastien . Bihorel
Damned, I did tried as.list but not list... Thanks Hadley and Duncan for your quick replies > On Thu, Jul 2, 2009 at 3:34 PM, Sebastien > Bihorel wrote: >> Dear R-users, >> >> I would like to know how expressions could be passed as arguments to >> do.call >&

[R] Code improvement

2009-10-22 Thread Sebastien Bihorel
Dear R-Users, I would like to have the opinion of the list on the following matter. I have this generic function that creates multiple lattice scatterplots per page based upon different subsets of the same dataset. The use of different line/point colors/symbols in each plot is based upon a '

Re: [R] How to calculate the area under the curve

2009-10-22 Thread Sebastien Bihorel
Well, you can use the trapezoidal rule to numerically calculate any area under the curve. I don't know if a specific exists but you could create one. The principle is basically to compute the area between two successive points of your profile with: AREA=0.5*(Response1 + Response2)/(Time2-Time1)

Re: [R] Code improvement

2009-10-27 Thread Sebastien Bihorel
te 2009/10/22 Sebastien Bihorel : Dear R-Users, I would like to have the opinion of the list on the following matter. I have this generic function that creates multiple lattice scatterplots per page based upon different subsets of the same dataset. The use of different line/point colors/symbol

[R] How to concatenate expressions

2009-11-20 Thread Sebastien Bihorel
Dear R-users, I am developing a plotting function, which receives expressions and character/numerical vectors as part of the many input arguments and which tries to concatenate them before displaying the result to the plot. I currently cannot find a way to make this concatenation works. I hav

Re: [R] How to concatenate expressions

2009-11-20 Thread Sebastien Bihorel
_along(a)) { text(x=i, y=i, labels=text[[i]]) } } testplot(a,b,c) HTH, baptiste 2009/11/20 Sebastien Bihorel : Dear R-users, I am developing a plotting function, which receives expressions and character/numerical vectors as part of the many input arguments and which tries to co

[R] Passing arguments to gpar

2009-12-03 Thread Sebastien Bihorel
Dear R-users, I would like to know how to pass arguments to gpar() without hard-coding them. I tried to store my arguments in a list and passed this list to gpar(), but it did find the way to do it properly. Any help would be appreciated. a<- list(fontisze=8,col=3) gpar(fontsize=8,col=3) gpa

[R] Source code for some grid package documentation

2009-12-04 Thread Sebastien Bihorel
Dear R-users, I was wondering if anybody would have the source code used to create the last figure in the frame.pdf documentation distributed with the grid package. Thanks in advance. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailma

Re: [R] Source code for some grid package documentation

2009-12-04 Thread Sebastien Bihorel
Thank you Romain, I appreciate the help. Romain Francois wrote: On 12/04/2009 04:28 PM, Sebastien Bihorel wrote: Dear R-users, I was wondering if anybody would have the source code used to create the last figure in the frame.pdf documentation distributed with the grid package. > file.s

[R] Apparent different in symbol scaling between xyplot and grid.points

2009-12-04 Thread Sebastien Bihorel
Dear R-users, For the past few days, I have been trying to find the reason why some of my plots were showing symbols of different sizes, while I thought I was using the same .cex arguments everywhere. The problem is exemplified by the following example code where the xyplot and grid.points fun

Re: [R] Apparent different in symbol scaling between xyplot and grid.points

2009-12-04 Thread Sebastien Bihorel
uot;), y=unit(0.5, "npc"))) lplot.xy(data.frame(x=0.55,y=0.5),type="p", pch=3) grid.points(x=0.45,y=0.5, pch=3, gp=gpar(col="red")) HTH, baptiste 2009/12/4 Sebastien Bihorel : Dear R-users, For the past few days, I have been trying to find the reason why some of m

Re: [R] Passing arguments to gpar

2009-12-07 Thread Sebastien Bihorel
Hi, Yes, that is exactly it. Charlie Sharpsteen gave me the same solution last week but he probably just replied to me, so his email did not go to the list. Thanks for the reply, I appreciate it I always forget about this do.call function. Paul Murrell wrote: Hi Sebastien Bihorel

[R] Problem with viewports, print.trellis and more/newpage

2009-05-14 Thread Sebastien Bihorel
st = c("centre","centre"), gp = gpar(fontsize = 10, font = 2)) popViewport() # Updates isnewpage # isnewpage <- TRUE } -- *Sebastien Bihorel, PharmD, PhD* PKPD Scientist Cognigen Corp Email: sebastien.biho...@cognigencorp.com <mailto:sebastien.bih

Re: [R] Problem with viewports, print.trellis and more/newpage

2009-05-15 Thread Sebastien . Bihorel
"titlevw") grid.text(label = "test", just = c("centre","centre"), gp = gpar(fontsize = 10, font = 2)) } > On Thu, May 14, 2009 at 1:58 PM, Sebastien Bihorel > wrote: >> Dear R-users, >> >> I have got th

[R] lattice strip argument check

2009-05-22 Thread Sebastien Bihorel
ion(...) strip.default(...,strip.names=c(TRUE,TRUE))) {} Thanks for your help -- *Sebastien Bihorel, PharmD, PhD* PKPD Scientist Cognigen Corp Email: sebastien.biho...@cognigencorp.com <mailto:sebastien.biho...@cognigencorp.com> Phone: (716) 633-3463

[R] How to force axis to have the same range

2009-04-20 Thread Sebastien Bihorel
Dear R-users, I am trying to produce (standard and trellis) scatterplots which use the same range of the x and y axes. In addition, I would like the plots to be physically square. Is there one or more specific argument(s) to plot and xyplot what would do that? I have looked at various combinat

Re: [R] RES: How to force axis to have the same range

2009-04-22 Thread Sebastien Bihorel
) argument. Maybe its can solve your issue. Best wishes. Rodrigo. -Mensagem original- De: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Em nome de Sebastien Bihorel Enviada em: segunda-feira, 20 de abril de 2009 12:26 Para: R-help Assunto: [R] How to force axis to hav

Re: [R] RES: How to force axis to have the same range

2009-04-24 Thread Sebastien Bihorel
Thanks to Greg and Deepayan for their answers. *Sebastien Bihorel, PharmD, PhD* PKPD Scientist Cognigen Corp Email: sebastien.biho...@cognigencorp.com <mailto:sebastien.biho...@cognigencorp.com> Phone: (716) 633-3463 ext. 323 Greg Snow wrote: For variables named my.x and my.y try:

[R] Understanding padding in lattice

2009-04-28 Thread Sebastien Bihorel
pad2=1), right=list(tck=1, pad1=1, pad2=1))) print(plot1) dev.off() ### -- *Sebastien Bihorel, PharmD, PhD* PKPD Scientist Cognigen Corp Email: sebastien.biho...@co

Re: [R] Understanding padding in lattice

2009-04-29 Thread Sebastien Bihorel
Thanks *Sebastien Bihorel, PharmD, PhD* PKPD Scientist Cognigen Corp Email: sebastien.biho...@cognigencorp.com <mailto:sebastien.biho...@cognigencorp.com> Phone: (716) 633-3463 ext. 323 Deepayan Sarkar wrote: On Tue, Apr 28, 2009 at 11:51 AM, Sebastien Bihorel wrote: Dear R-use

[R] Evaluation of an expression as function argument

2009-04-29 Thread Sebastien Bihorel
Dear R-users, I would like to know if is it possible to set a function argument as an evaluated expression. I have tried several syntaxes, including the following example, but could not get it anything to run. The plot function is used here but I would like to later apply the same approach to

Re: [R] Evaluation of an expression as function argument

2009-04-30 Thread Sebastien Bihorel
Thanks Uwe and Baptiste *Sebastien Bihorel, PharmD, PhD* PKPD Scientist Cognigen Corp Email: sebastien.biho...@cognigencorp.com <mailto:sebastien.biho...@cognigencorp.com> Phone: (716) 633-3463 ext. 323 Uwe Ligges wrote: Sebastien Bihorel wrote: Dear R-users, I would like to know

Re: [R] Understanding padding in lattice

2009-04-30 Thread Sebastien Bihorel
debugging this sort of thing. Try ... showViewport() ... or possibly ... showViewport(newpage=TRUE) ... just after drawing your plot. Paul Deepayan Sarkar wrote: On Tue, Apr 28, 2009 at 11:51 AM, Sebastien Bihorel wrote: Dear R-users, I am trying to understand what the different padding

[R] Control the variable order after multiple declarations using within

2019-07-03 Thread Sebastien Bihorel
Hi, The within function can be used to modify data.frames (among other objects). One can even provide multiple expressions to modify the data.frame by more than one expression. However, when new variables are created, they seem to be inserted in the data.frame in the opposite order they were d

Re: [R] Control the variable order after multiple declarations using within

2019-07-03 Thread Sebastien Bihorel
Hi Kevin, I was hoping to stay within base R functionality. Thanks - Original Message - From: "Kevin Thorpe" To: "Sebastien Bihorel" Cc: "R Help Mailing List" Sent: Wednesday, July 3, 2019 8:11:51 AM Subject: Re: [R] Control the variable order aft

Re: [R] Control the variable order after multiple declarations using within

2019-07-03 Thread Sebastien Bihorel
Hi Eric, I was hoping to avoid post-processing the result of the within call. Sebastien From: "Eric Berger" To: "Sebastien Bihorel" Cc: "R mailing list" Sent: Wednesday, July 3, 2019 8:13:22 AM Subject: Re: [R] Control the variable order after multiple d

Re: [R] Control the variable order after multiple declarations using within

2019-07-04 Thread Sebastien Bihorel
Thanks all for your inputs. - Original Message - From: "Duncan Murdoch" To: "Jeff Newmiller" , r-help@r-project.org, "Eric Berger" , "Richard O'Keefe" Cc: "Sebastien Bihorel" Sent: Wednesday, July 3, 2019 12:52:55 PM Sub

[R] Problem with save/load across R versions and OS

2019-07-17 Thread Sebastien Bihorel
Hi, I am trying to transfer an S4 object from a machine working with CentOS 7.2 / R 3.4.3 to another one running Linux Mint 19 / R 3.6.0. If I save the object using saveRDS in obj.rds, loadRDS returns an "unknown input format" error on my Linux Mint machine. Interestingly enough, obj.rds loads

Re: [R] Problem with save/load across R versions and OS

2019-07-17 Thread Sebastien Bihorel
Hi, Yes, I tried save/load... same failure. But I did not yet try dump/source or dput/dget. I will From: "Bert Gunter" To: "Sebastien Bihorel" Cc: "R-help" Sent: Wednesday, July 17, 2019 10:27:24 AM Subject: Re: [R] Problem with save/load across R versi

Re: [R] Problem with save/load across R versions and OS

2019-07-17 Thread Sebastien Bihorel
. I tried but I could not find the way to properly write and read the serialized object. Thanks - Original Message - From: "Duncan Murdoch" To: "Sebastien Bihorel" , r-help@r-project.org Sent: Wednesday, July 17, 2019 10:42:13 AM Subject: Re: [R] Problem with save/lo

Re: [R] Problem with save/load across R versions and OS

2019-07-17 Thread Sebastien Bihorel
rdoch" To: "Sebastien Bihorel" Cc: r-help@r-project.org Sent: Wednesday, July 17, 2019 3:04:46 PM Subject: Re: [R] Problem with save/load across R versions and OS On 17/07/2019 2:02 p.m., Sebastien Bihorel wrote: > Hi, > > Indeed the S4 object is a class provided by a co

[R] Release of rclipboard 0.2.0

2023-10-21 Thread Sebastien Bihorel
Hi, Version 0.2.0 of rclipboard has been released to CRAN. This provides a minor update of the underlying js library and a support for display of `bslib::tooltip` for Shiny apps built with `bslib` package. Enjoy! [[alternative HTML version deleted]] _

[R] Capturing warnings with capture.output

2013-09-05 Thread Sebastien Bihorel
Dear R-users, I would like to follow-up on a old thread by Hadley Wickham about capturing warnings with capture.output. My goal is to evaluate a function call and capture the results of the function call plus warning calls and messages if a warning is returned. For instance, in the following

[R] Working with Oracle large objects in R

2014-06-19 Thread Sebastien Bihorel
Hi, I was wondering if anybody could share their experience with interfacing R with Oracle databases for extraction of large objects. I would be more specifically interested in how to extract large objects storing big text files. Thank you Sebastien

[R] R command execution from shell

2011-01-04 Thread Sebastien Bihorel
Dear R-users, Is there a way I can ask R to execute the "write("hello world",file="hello.txt")" command directly from the UNIX shell, instead of having to save this command to a .R file and execute this file with R CMD BATCH? Thank you Sebastien

Re: [R] R command execution from shell

2011-01-04 Thread Sebastien Bihorel
Thank you That is exactly what I was looking for. Sebastien Duncan Murdoch wrote: On 04/01/2011 3:21 PM, Sebastien Bihorel wrote: Dear R-users, Is there a way I can ask R to execute the "write("hello world",file="hello.txt")" command directly from the UNIX sh

[R] Stop and call objects

2011-01-05 Thread Sebastien Bihorel
Dear R-users, Let's consider the following snippet: f <- function(x) tryCatch(sum(x),error=function(e) stop(e)) f('a') As expected, the last call returns an error message: Error in sum(x) : invalid 'type' (character) of argument My questions are the following: 1- can I easily ask the stop f

Re: [R] R command execution from shell

2011-01-05 Thread Sebastien Bihorel
Thank you for this alternative. Both seem to work on my systems. Sebastien Prof Brian Ripley wrote: On Tue, 4 Jan 2011, Duncan Murdoch wrote: On 04/01/2011 3:21 PM, Sebastien Bihorel wrote: Dear R-users, Is there a way I can ask R to execute the "write("hello world",

Re: [R] Stop and call objects

2011-01-06 Thread Sebastien Bihorel
>> From: r-help-boun...@r-project.org >> [mailto:r-help-boun...@r-project.org] On Behalf Of Henrique >> Dallazuanna >> Sent: Wednesday, January 05, 2011 9:26 AM >> To: Sebastien Bihorel >> Cc: R-help >> Subject: Re: [R] Stop and call objects >&g

[R] Global variables

2011-01-06 Thread Sebastien Bihorel
Dear R-users, Is there a way I can prevent global variables to be visible within my functions? Sebastien __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/post

Re: [R] Global variables

2011-01-10 Thread Sebastien Bihorel
Thank Gabor and Duncan, That will be helpful. Gabor Grothendieck wrote: > On Thu, Jan 6, 2011 at 4:59 PM, Duncan Murdoch > wrote: > >> On 06/01/2011 4:45 PM, Sebastien Bihorel wrote: >> >>> Dear R-users, >>> >>> Is there a way I can

Re: [R] Global variables

2011-01-11 Thread Sebastien Bihorel
be related in a hierarchy. Michael On 10 January 2011 23:48, Sebastien Bihorel wrote: Thank Gabor and Duncan, That will be helpful. Gabor Grothendieck wrote: On Thu, Jan 6, 2011 at 4:59 PM, Duncan Murdoch wrote: On 06/01/2011 4:45 PM, Sebastien Bihorel wrote: Dear

[R] [R-pkgs] Release of the scaRabee package

2010-05-07 Thread Sebastien Bihorel
version 1.0. Any question, comment or feedback on this package is to be sent at: sb.pm...@gmail.com. Sebastien Bihorel [[alternative HTML version deleted]] ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch/mailman/listinfo/r

[R] [R-pkgs] Release of optimbase, optimsimplex and neldermead packages

2010-05-07 Thread Sebastien Bihorel
in version 1.0-1 on CRAN. Any question, comment or feedback on those packages can be sent at: sb.pm...@gmail.com. Sebastien Bihorel [[alternative HTML version deleted]] ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.

[R] Difference of AIC computation between R (>2.12) and Splus (7.0.6) during stepwise GAM analysis

2012-05-11 Thread Sebastien Bihorel
Dear R Users, I was wondering if some members of the list could shed some light on the difference in AIC computation existing between R (>2.12; gam package) and Splus (7.0.6). Because I am not a statistician by training, I would like to apologize in advance if I use wrong terms or dot not desc

[R] User input in batch mode

2009-01-16 Thread Sebastien Bihorel
__ R-help@r-project.org 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 commented, minimal, self-contained, reproducible code.

Re: [R] User input in batch mode

2009-01-20 Thread Sebastien Bihorel
__ R-help@r-project.org 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 commented, minimal, self-contained, reproducible code.

[R] User input in batch mode

2009-01-22 Thread Sebastien Bihorel
installed on a Solaris system -- *Sebastien Bihorel, PharmD, PhD* PKPD Scientist Cognigen Corp Email: sebastien.biho...@cognigencorp.com <mailto:sebastien.biho...@cognigencorp.com> Phone: (716) 633-3463 ext. 323 __ R-help@r-project.org mailing list

[R] Help with sas.get

2009-01-26 Thread Sebastien Bihorel
t") : /home/sbihorel/my_documents/Testing_env/SAS_dataset_R_import/formats.sc? or formats.sas7bcat not found. Formatting ignored. Execution halted -- Sebastien Bihorel __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] Numeric class and sasxport.get

2009-02-03 Thread Sebastien Bihorel
Frank, It is a non existing issue for me if the variables of class "labelled" (and only "labelled") can only be numerical variables (integer or numeric). Sebastien Frank E Harrell Jr wrote: Sebastien Bihorel wrote: Dear R-users, The sasxport.get function (fr

[R] Numeric class and sasxport.get

2009-02-03 Thread Sebastien Bihorel
Dear R-users, The sasxport.get function (from the Hmisc package) automatically defines the class of imported variables. I have noticed that the class of theoretically numeric variables is simply "labelled", although character variables might end up been defined as "labelled" "Date" or "labelle

Re: [R] Numeric class and sasxport.get

2009-02-04 Thread Sebastien Bihorel
wondering what I will loose by removing this attribute. *Sebastien Bihorel, PharmD, PhD* PKPD Scientist Cognigen Corp Email: sebastien.biho...@cognigencorp.com <mailto:sebastien.biho...@cognigencorp.com> Phone: (716) 633-3463 ext. 323 Frank E Harrell Jr wrote: sebastien.biho...@cognig

Re: [R] Numeric class and sasxport.get

2009-02-04 Thread Sebastien Bihorel
ot;) class(foo[,sglClassVarInd[i]]) <- c(class(x), class(unclass(x))) } return(foo) } *Sebastien Bihorel, PharmD, PhD* PKPD Scientist Cognigen Corp Email: sebastien.biho...@cognigencorp.com <mailto:sebastien.biho...@cognigencorp.com> Phone: (716) 633-3463 ext. 323 Frank E Harrell J

Re: [R] Numeric class and sasxport.get

2009-02-05 Thread Sebastien Bihorel
Ok, just so as I get that straight, is the 'labelled' class something that you created in your package or a readily available class in base R? *Sebastien Bihorel, PharmD, PhD* PKPD Scientist Cognigen Corp Email: sebastien.biho...@cognigencorp.com <mailto:sebastien.biho...@cog

[R] xyplot multiple conditions and empty panels

2009-02-06 Thread Sebastien Bihorel
Dear R-users, Is it possible to prevent xyplot from drawing empty panels when using multiple conditions and when the dataset has a incomplete set of condition combinations - like in the following example? I have tried to modify the drop.unused.levels argument but without any success. Any help

Re: [R] how to delete specific rows in a data frame where the first column matches any string from a list

2009-02-06 Thread Sebastien Bihorel
Hi Laura, You might want to read the manual on Data importation and exportation on the cran webpage http://cran.r-project.org/ Otherwise, have a look at ?read.table. Sebastien __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinf

[R] read.table and NaN

2019-10-23 Thread Sebastien Bihorel via R-help
Hi, Is there a way to make read.table consider NaN as a string of characters rather than the internal NaN? Changing the na.strings argument does not seems to have any effect on how R interprets the NaN string (while is does not the the NA string) con <- textConnection(object = 'A,B\n1,NaN\nNA,

  1   2   >