search for: bihorel

Displaying 20 results from an estimated 63 matches for "bihorel".

2018 Mar 12
7
Equivalent of gtools::mixedsort in R base
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 like the order function does 2- gtools has not been updated in 2.5
2009 May 14
1
Problem with viewports, print.trellis and more/newpage
...height=0.05, just=c(0,0))) grid.text(label = i, just = c("centre","centre"), gp = gpar(fontsize = 10, font = 2)) popViewport() # Updates isnewpage # isnewpage <- TRUE } -- *Sebastien Bihorel, PharmD, PhD* PKPD Scientist Cognigen Corp Email: sebastien.bihorel at cognigencorp.com <mailto:sebastien.bihorel at cognigencorp.com> Phone: (716) 633-3463 ext. 323
2018 Apr 09
3
Question about subset
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 consider missing values as true. Thanks
2009 Apr 28
1
Understanding padding in lattice
...1, pad2=1), right=list(tck=1, pad1=1, pad2=1))) print(plot1) dev.off() ########################### -- *Sebastien Bihorel, PharmD, PhD* PKPD Scientist Cognigen Corp Email: sebastien.bihorel at cognigencorp.com <mailto:sebastien.bihorel at cognigencorp.com> Phone: (716) 633-3463 ext. 323
2018 Mar 12
0
Equivalent of gtools::mixedsort in R base
..."Old","Old"), result=5:1) > do.call(order, d) Error in match.arg(method) : 'arg' must be NULL or a character vector > do.call(order, unname(as.list(d))) [1] 2 1 5 4 3 Bill Dunlap TIBCO Software wdunlap tibco.com On Sun, Mar 11, 2018 at 9:15 PM, Sebastien Bihorel < sebastien.bihorel at cognigencorp.com> wrote: > 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 t...
2018 Apr 09
0
Question about subset
Sent from my iPhone > On Apr 8, 2018, at 9:06 PM, Sebastien Bihorel <sebastien.bihorel at cognigencorp.com> wrote: > > 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 o...
2009 Feb 03
2
Numeric class and sasxport.get
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 "labelled" "factor". Is there a way to tell sasxport.get to
2018 Mar 12
0
Equivalent of gtools::mixedsort in R base
..., let = gsub("\\d", "", x), no = as.numeric(gsub("\\D", "", x)), x = NULL)) DF[o,, drop = FALSE ] On Mon, Mar 12, 2018 at 12:15 AM, Sebastien Bihorel <sebastien.bihorel at cognigencorp.com> wrote: > 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 pa...
2018 Mar 12
0
Equivalent of gtools::mixedsort in R base
...eone else has better insight than I. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sun, Mar 11, 2018 at 9:15 PM, Sebastien Bihorel < sebastien.bihorel at cognigencorp.com> wrote: > 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 t...
2009 Apr 20
3
How to force axis to have the same range
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 combinations of asp and pin value, but could not get what I wanted.. Thank you in advance for your help
2018 May 03
1
Calling the curve function with a character object converted into an expression
...s, > Bert > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Wed, May 2, 2018 at 8:11 PM, Sebastien Bihorel > <sebastien.bihorel at cognigencorp.com> wrote: >> >> 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 req...
2011 Aug 31
3
How to modify the dot-dot-dot argument using level names instead of position
Dear R-users, In the R internals manual, it is said that one can extract the elements of the dot-dot-dot argument using the special symbols ..1 or ..2. It seems to work just fine but I was wondering if there is a way one can extract or modify the content of the dot-dot-dot argument using a level name instead of its position? For instance, assuming that list(...) returns: $a [1] 1 2 3 4 5
2009 Aug 21
2
Problem with passing a string to subset
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)) > mystr<-"c==1" > subset(foo,c==1) a b c 1 1 10 1 3 3 8 1 5 5 6
2018 Mar 12
1
Equivalent of gtools::mixedsort in R base
...t > > > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along and > sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > On Sun, Mar 11, 2018 at 9:15 PM, Sebastien Bihorel < > sebastien.bihorel at cognigencorp.com> wrote: > >> 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 mi...
2009 Sep 02
2
combining grid.text, expression and variables
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 expression functions. Unfortunately, my expressions do not seem to be evaluated. I would greatly
2011 Dec 06
2
How to automate the detection of break points for use in cut
Dear R-users, I would like to know if there is a function (in base R or the extension packages) that would automatically detect the break points in a vector x for later use in the cut function. The idea is to determine the boundaries of the n intervals (n>=1) delimiting clusters of data points which could be considered "reasonably" close, given a numerical vector x with unknown
2018 May 03
0
Calling the curve function with a character object converted into an expression
...standing 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 it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, May 2, 2018 at 8:11 PM, Sebastien Bihorel <sebastien.bihorel at cognigencorp.com> wrote: > > 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 fu...
2011 Jan 04
4
Listing of available functions
Dear R-users, Is there a easy way to access to a complete listing of available functions from a R session? The help.start() and ? functions are great, but I feel like they require the user to know the answer in advance (especially with respect to function names)... I could not find a easy way to simply browse through a list of functions and randomly pick one function to see what is does. Is
2018 May 03
2
Calling the curve function with a character object converted into an expression
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 accepted by curve? Thanks in advance for your help. ## The following attempts do not work myf <-
2009 Jul 02
2
Passing expression as argument to do.call
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 that? Thanks you Sebastien foo <- list(x=1:10, y=1:10) mylist <- list(pch=6, col=2) title