Displaying 20 results from an estimated 20000 matches similar to: "Function scope issues"
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
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
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
2010 Apr 14
2
R package documentation
Dear R users,
I am currently writing the documentation for my first package. I have
created a short user manual using sweave/pdflatex which is distinct from the
manual/summary-of-package-functions created by R CMD CHECK. I was wondering
how could I seamlessly combine both documents.
Thanks for your help
Sebastien
[[alternative HTML version deleted]]
2007 Jun 13
2
Design library installation problem
Dear Listers
I have tried to install Frank Harrell's two libaries: Hmisc
and Design.
I found that Hmisc was listed in the list of packages from
the Install Packages command on the Packages menu, but
Design was not. I installed Hmisc from this list, and when I
issued the library(Hmisc) command, it loaded into memory
correctly.
I then copied the Design 1.1-1.zip file from the
2009 Nov 30
3
Question about output from optim
Dear R-users,
I am trying to port to R something that I wrote in Matlab to perform model
parameter optimization using the Nelder-Mead simplex method (fminsearch). I
read the help on ?optim (which seems to be the way to go) as well as a bunch
of posts on the topic, but I would like to make sure about something before
I spend to much time trying to reproduce something that is not possible. The
2003 Oct 15
3
Design and Hmisc
I'm looking for design and hmisc version 2.0 for R 1.8 for windows. I've
found design 2.0 in the downloads for R1.7 but not hmisc.
I've also checked Dr. Harrell's site and it only goes to 1.6 for windows.
Any thoughts?
Shawn Way
2005 Apr 26
2
how to modify and compile R sourse codes
Dear All:
I am working on writing some R functions to make statistical reports automatically. Dr. Harrell's Hmisc has all the wonderful stuff. But sometimes I need change some formats, so I want to read through it and make some modifications to fit my project.
Ideally, I want proceed as following:
1. change some source of Hmisc
2. compile and install the modified Hmisc
3. debug my
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
2011 Oct 19
2
How to call a function defined within another function
Dear R-users,
I would need some advices on the proper way to call a particular function.
This function is called scope.char and it is embedded in the step.gam
function from the gam package. I am trying to call scope.char directly in a
script but I did not find the proper way to do so. Is this even possible? If
so, what is the proper syntax?
Thank you for your time and help.
Sebastien
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
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
2003 May 16
1
Question on ldBands function in Hmisc package by Harrell
Has anyone tried to download Hmisc and used ldBands function for calculating
Lan-Demets group sequential boundaries? The write-up in F.Harrell's website
indicates that, besides downloading the package Hmisc, one needs to copy the
progra ld98 from the University of Wisconsin website. As suggested, I did
this but received another error message regarding the search path. I think
I have fixed
2009 May 14
1
Problem with viewports, print.trellis and more/newpage
Dear R-users,
I have got the following problem. I need to create 4x2 arrays of
xyplot's on several pages. The plots are created within a loop and
plotted using the print function. It seems that I cannot find the proper
grid syntax with my viewports, and the more/newpage arguments.
The following script is a simplification but hopefully will suffice to
illustrate my problem. Any suggestion
2009 Apr 28
1
Understanding padding in lattice
Dear R-users,
I am trying to understand what the different padding arguments in
trellis.par.set are exactly controlling the space around lattice plots.
I have used the following code as a basis for testing but it did not
really help me to visualize how the value of each argument changes the
margins and the plotting area. I guess a better way to visualize the
effects of these padding items
2008 Sep 03
1
problem with Hmisc
Dear All,
I'm reading Frank Harrell's wonderful Regression
Modeling Strategies book and ran into a problem
following the example in Chapter 8. I'm working
on
platform: Ubuntu 8.04 (i486-pc-linux-gnu)
R version: 2.7.2 (2008-08-25)
and my command sequence was:
library(chron)
library(Hmisc)
load("prostate.sav")
describe(prostate)
The last command returned the error
2018 Mar 12
0
Equivalent of gtools::mixedsort in R base
1- mixedorder does not work in a "do.call(mixedorder, mydataframe)"
call like the order function does
This is tangential, but do.call(order, mydataframe) is not safe to use in a
general purpose function either - you need to remove the names from
the second argument:
> d <- data.frame(method=c("New","New","Old","Old","Old"),
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 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 of the base or recommended
2003 Aug 12
3
Sorting a dataframe
Undoubtedly a simple question:
I've looked at order() and sort() in the help pages for
R1.7.1. It doesn't appear that these functions are immediately
suited to doing the same thing as
PROC SORT DATA = BLAH;
BY X Y Z;
RUN;
in SAS. I have also checked Frank Harrell's Hmisc library.
Could someone point me in the right direction so I can sort
by the levels of Z within the levels of