Displaying 12 results from an estimated 12 matches for "g_smit".
Did you mean:
g_smits
2007 Feb 15
3
something missing in summary()
I just noticed that two key pieces of information are not given by
the summary() command: N and SD. we are given the N missing, but
not the converse. I know these summary value can be obtained easy,
but can't understand why these two pieces of information are not
provided with the other info.
Thanks,
Gerard
2007 Sep 07
2
R first.id last.id function error
Hi R users,
I have a test dataframe ("file1," shown below) for which I am trying
to create a flag for the first and last ID record (equivalent to SAS
first.id and last.id variables.
Dump of file1:
> file1
id rx week dv1
1 1 1 1 1
2 1 1 2 1
3 1 1 3 2
4 2 1 1 3
5 2 1 2 4
6 2 1 3 1
7 3 1 1 2
8 3 1 2 3
9 3 1 3
2008 Jan 13
3
product of vector elements
All,
I would like to find a simper method that I now have to find the
product of all elements in a vector:
#get product of vector elements: (1,2,3,4,5)
vec.product <- exp(sum(log(c(1,2,3,4,5))))
I have not found a vector product function, if one has been written.
Thanks,
Gerard
[[alternative HTML version deleted]]
2010 Mar 14
2
special symbols into a text string
All,
I am trying to put a few special symbols into a string to place on a graph (e.g., >= and superscript 2).
This clearly works, but does not look good: text<-c("x2", "A>=B")
I tried pasting in the >= symbol, but just comes out as an =.
I have tried expression() with no luck: text<-c("x2", expression(x^2))
Any help appreciated.
Thanks,
2012 Feb 20
1
question on axis labels
Hi All,
I'm trying to label my plot axis with times (HH:MM) that correspond to a numeric index (values 0:6) for my time variable. I'd like to plot "08:00", "12:00", and so on, instead of 0 through 6.
I have used the following line of code:
axis(1, 0:6, labels=c("08:00", "12:00", "16:00", "20:00", "24:00",
2008 Jan 01
3
if statement problem
Hi All,
I have a small dataset named das (43 cases) in which I am trying to
create a binary outcome (1/0) based on the following code:
if (das$age>65 && das$bmi>30) {das$danger<-1} else das$danger<-0
I am setting a flag called 'danger' to 1 of the subject is over 65
and has a BMI > 30.
I find that my statement evaluates the first record in the data.frame
and
2010 Oct 06
4
problem with abline
Hi All,
I am running a scatter plot and trying to add a best fit line. I use an abline function, but get no line drawn over the points. I also get no error. I arm using V 2.10.0 on Windows 7.
Here is my code, including the SAS transport file import:
require (foreign)
require (chron)
require (Hmisc)
require (lattice)
clin <- sasxport.get("y:\\temp\\subset.xpt")
attach(clin)
2007 Mar 04
0
Trouble figuring messages from rcspline.plot
I have an attached data.frame with a binary composite variable (comp)
and a predictor (egfr). I am trying to plot a restricted cubic spline using:
require (Hmisc)
require (Design)
rcspline.plot(x=egfr,y=comp,model="logistic",nk=5,knots=NULL,
xlab="label1", ylab="Label2",
plim=c(0,1), plotcl=TRUE,
showknots=TRUE,
2007 Jan 21
1
sequential processing
Like many others, I am new to R but old to SAS.
Am I correct in understanding that R processes a data frame in a
sequential ly? This would imply that large input files could be
read, without the need to load the entire file into memory.
Related to the manner of reading a frame, I have been looking for the
equivalent of SAS _n_ (I realize that I can use a variant of which to
identify an index
2009 Feb 08
0
Modifying forestplot function in rmeta
All,
I am using the forestplot function in rmeta.
I was able to modify the x axis range by commenting out one line and
feeding it two new parameters (I wanted to set zero as the axis start point).
#xrange <- c(max(min(lower, na.rm = TRUE), clip[1]),
min(max(upper, na.rm = TRUE), clip[2]))
#new line
xrange <- c(xlow,xhigh)
Now I am trying to modify the text font size for
2007 Sep 15
3
applying math/stat functions to rows in data frame
Hi All,
There are a variety of functions that can be applied to a variable
(column) in a data frame: mean, min, max, sd, range, IQR, etc.
I am aware of only two that work on the rows, using q1-q3 as example
variables:
rowMeans(cbind(q1,q2,q3),na.rm=T) #mean of multiple variables
rowSums (cbind(q1,q2,q3),na.rm=T) #sum of multiple variables
Can the standard column functions (listed in the
2009 Mar 21
1
Forestplot () box size question
Hi All,
I have been able to modify the x-axis to start at zero by adding xlow
and xhigh parameters; that was pretty simple. I have been unable to
find the location of the code that would turn off the information
weighting of the box size (I have smaller randomized trials getting
less weight than a much larger non-randomized trial). The function
is forestplot() from rmeta.
Thanks for any