[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]] _

Re: [R] Nonlinear logistic regression fitting

2020-07-29 Thread Sebastien Bihorel via R-help
+ b*x/(c+x)". Correct? Thanks From: Duncan Murdoch Sent: Wednesday, July 29, 2020 16:04 To: Sebastien Bihorel ; J C Nash ; r-help@r-project.org Subject: Re: [R] Nonlinear logistic regression fitting Just a quick note about jargon: you are using the word &q

Re: [R] Nonlinear logistic regression fitting

2020-07-29 Thread Sebastien Bihorel via R-help
b*x/(c+x) From: Duncan Murdoch Sent: Wednesday, July 29, 2020 16:04 To: Sebastien Bihorel ; J C Nash ; r-help@r-project.org Subject: Re: [R] Nonlinear logistic regression fitting Just a quick note about jargon: you are using the word "likelihood" in

Re: [R] Nonlinear logistic regression fitting

2020-07-29 Thread Sebastien Bihorel via R-help
= df[,2:3], link = 'logit', mu = ~ p_a, pmu = c(a) ) emax_mod <- gnlm::bnlr( y = df[,2:3], link = 'logit', mu = ~ p_a + p_b*x/(p_c+x), pmu = c(a, b, c) ) int_mod emax_mod ____ From: J C Nash Sent: Tuesday, July 28, 2020 14:16 To: Sebast

Re: [R] Nonlinear logistic regression fitting

2020-07-28 Thread Sebastien Bihorel via R-help
From: Rui Barradas Sent: Tuesday, July 28, 2020 12:42 To: Sebastien Bihorel ; r-help@r-project.org Subject: Re: [R] Nonlinear logistic regression fitting Hello, glm might not be the right tool for the MM model but nls is meant to fit non-linear models. And, after an on-line search, there

Re: [R] Nonlinear logistic regression fitting

2020-07-28 Thread Sebastien Bihorel via R-help
I hardly see how your reply addressed my question or any part of it. It looks to me that it was simply assumed that I did not perform any search before posting. From: Bert Gunter Sent: Tuesday, July 28, 2020 11:30 To: Sebastien Bihorel Cc: r-help@r-project.org

Re: [R] Nonlinear logistic regression fitting

2020-07-28 Thread Sebastien Bihorel via R-help
11:12 To: Sebastien Bihorel Cc: r-help@r-project.org Subject: Re: [R] Nonlinear logistic regression fitting Search! ... for "nonlinear logistic regression" at rseek.org<http://rseek.org>. Bert Gunter "The trouble with having an open mind is that people keep coming along

[R] Nonlinear logistic regression fitting

2020-07-28 Thread Sebastien Bihorel via R-help
Hi I need to fit a logistic regression model using a saturable Michaelis-Menten function of my predictor x. The likelihood could be expressed as: L = intercept + emax * x / (EC50+x) Which I guess could be expressed as the following R model ~ emax*x/(ec50+x) As far as I know (please, correct

Re: [R] Creating file from raw connection

2020-05-29 Thread Sebastien Bihorel via R-help
Thanks Duncan From: Duncan Murdoch Sent: Friday, May 29, 2020 15:36 To: Sebastien Bihorel ; r-help@r-project.org Subject: Re: [R] Creating file from raw connection   On 29/05/2020 3:00 p.m., Sebastien Bihorel via R-help wrote: > Hi, > > Let's say I can extract the content of

[R] Creating file from raw content

2020-05-29 Thread Sebastien Bihorel via R-help
Hi, Let's say I can extract the content of an Excel .xlsx file stored in a database and store it as raw content in an R object. What would be the proper way to "create" a .xlsx file and "transfer" the content of this obj into it? I took the example of an Excel file, but my question would extend

[R] Creating file from raw connection

2020-05-29 Thread Sebastien Bihorel via R-help
Hi, Let's say I can extract the content of an Excel .xlsx file stored in a database and store it as raw content in an R object. What would be the proper way to "create" a .xlsx file and "transfer" the content of this obj into it? I took the example of an Excel file, but my question would extend

Re: [R] POSIX system oddities

2020-03-29 Thread Sebastien Bihorel via R-help
Duh !!! Thanks. From: Peter Langfelder Sent: Sunday, March 29, 2020 20:12 To: Sebastien Bihorel Cc: r-help@r-project.org Subject: Re: [R] POSIX system oddities The time has changed from "standard" (EST) to "Daylight saving" (EDT) whic

[R] POSIX system oddities

2020-03-29 Thread Sebastien Bihorel via R-help
Hi, Why is there less number of seconds on 03/10/2019 in the internal POSIX system? The difference between the previous or the next day eems to be exactly 1 hour. I could not find anything in the manuals on CRAN. > dates <- as.POSIXct(sprintf('03/%s/2019',9:12), format = '%m/%d/%Y') > dates [1]

Re: [R] Can file size affect how na.strings operates in a read.table call?

2019-11-14 Thread Sebastien Bihorel via R-help
ional post-processing may be warranted. Thanks for the hints. From: William Dunlap Sent: Thursday, November 14, 2019 11:51 To: Jeff Newmiller Cc: Sebastien Bihorel ; r-help@r-project.org Subject: Re: [R] Can file size affect how na.strings operates in a read.t

Re: [R] Can file size affect how na.strings operates in a read.table call?

2019-11-14 Thread Sebastien Bihorel via R-help
The data file is a csv file. Some text variables contain spaces. "Check for extraneous spaces" Are there specific locations that would be more critical than others? From: Jeff Newmiller Sent: Thursday, November 14, 2019 10:52 To: Sebastien Bihorel ;

[R] Can file size affect how na.strings operates in a read.table call?

2019-11-14 Thread Sebastien Bihorel via R-help
Hi, I have this generic function to read ASCII data files. It is essentially a wrapper around the read.table function. My function is used in a large variety of situations and has no a priori knowledge about the data file it is asked to read. Nothing is known about file size, variable types, va

Re: [R] read.table and NaN

2019-10-25 Thread Sebastien Bihorel via R-help
nter Sent: Thursday, October 24, 2019 10:39 To: Sebastien Bihorel Cc: r-help@r-project.org Subject: Re: [R] read.table and NaN Not so. Read ?read.table carefully. You can use "NA" as a default. Moreover, you **specified** that you want NaN read as character, which means that any c

Re: [R] read.table and NaN

2019-10-24 Thread Sebastien Bihorel via R-help
Gunter Sent: Thursday, October 24, 2019 00:08 To: Sebastien Bihorel Cc: r-help@r-project.org Subject: Re: [R] read.table and NaN Like this? con <- textConnection(object = 'A,B\n1,NaN\nNA,2') > tmp <- read.table(con, header = TRUE, sep = ',', na.strings = &#

[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,

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

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
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

[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] 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

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-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

[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] 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] 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] 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] 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

[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

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.

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
>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-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

[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] 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] 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] 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

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
. - 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

[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] 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

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

[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] 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] 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] 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

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

[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] 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

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-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
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

[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

[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] 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",

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

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

[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.

[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] 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] 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

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

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

[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] 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

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",

[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-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] 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

[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] [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

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] 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] 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

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

[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] 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] 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

[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

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] 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] 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

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)

[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] 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] 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] 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] 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] 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] 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] 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] 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

[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

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] 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] 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

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

  1   2   >