search for: connerpharmd

Displaying 10 results from an estimated 10 matches for "connerpharmd".

2011 Oct 01
2
Returning vector of values shared across 3 vectors?
Help-Rs,   I've got three vectors representing participants:   vec1 <- c(4,5,6,7,8,9,10,11,12,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81) vec2 <- c (1,2,3,4,5,6,7,8,9,10,11,12,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66) vec3 <- c (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,52)   I'd
2011 Oct 06
1
Issue with read.csv treatment of numerics enclosed in quotes (and a confession)
Dear Help-Rs,   I've been dealing with this problem for some time, using a work-around to deal with it. It's time for me to come clean with my ineptitude and seek a what has got to be a more streamlined solution from the Help-Rverse.   I regularly import delimited text data that contains numerics enclosed in quotes (e.g., "00765288071").  Thing is, for some of these data, I need
2011 Nov 18
1
couting events by subject with "black out" windows
I large datset that includes subjects(ID), Dates and events that need to be counted.  Not every date includes an event, and I need to only count one event per 30days, per subject.  So in essence, I need to create a 30-day "black out" period during which time an event cannot be "counted" for each subject.  The reason is that a rule has been set up, whereby a subject can only be
2011 Nov 29
2
Help with recast() syntax
Dear Help-Rs,   I have data similar to the following:   DF <- structure(list(X = 1:22, RESULT = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("NEG", "POS"), class = "factor"), YR_MO = c(201011L, 201012L, 201101L, 201102L, 201103L, 201104L, 201105L, 201106L, 201107L, 201108L, 201109L, 201011L,
2012 Jan 11
3
turning a list of vectors into a data.frame (as rows of the DF)?
As a newer R practicioner, it seems I stump myself weekly (at least) with issues that have spinning my wheels.  Here is yet another... I'm trying to turn a list of numeric vectors (of uneual length) inot a dataframe.  Each vector held in the list represents a row, and there are some rows of unequal length.  I would like NAs as placeholders for "missing" data in the shorter vectors. 
2011 Oct 14
1
is there an option to "turn off" scientific notation in write.csv
Dear Help-Rs,   I'm working with a file that contains large numbers and I need to export them "as is".  for example take:   x <- c(27104010002005,27104020001805,27104090001810,90050013000140,90050013000120) y <- c(1:5) df <- data.frame(cbind(x,y))   When I then try a simple: write.csv(df,file="df.csv")   I get:  x y 1 2.7104E+13 1 2 2.7104E+13 2 3 2.71041E+13 3
2011 Dec 12
0
using dcast to reshape a DF from long to wide with multiple measured variables per obs
I have data in the following format:   person<- c(1,1,1,1,2,2,2,2,2,3,3,3,3,3,3) v2<- c("2011-01-01", "2011-02-01", "2011-03-01", "2011-04-01", "2011-01-01", "2011-02-01", "2011-03-01", "2011-04-01", "2011-05-01", "2011-01-01", "2011-02-01", "2011-03-01",
2012 Jan 06
1
Please help!! How do I set graphical parameters for ploting ctree()
I'm trying to understand how to set graphical parameters for trees created with the party package.  For example take the following code:   library(party)     data(airquality)     airq <- subset(airquality, !is.na(Ozone))     airct <- ctree(Ozone ~ ., data = airq,                    controls = ctree_control(maxsurrogate = 3))     plot(airct)   My problem is, I've got a ctree that has
2011 Sep 26
1
producing an aggregate table of top 3 by cost
Help-Rs   As someone who is newer to R and trying to make the transition from Access into R, there is a frequetnly used function that I'd like to try and duplicate in the R world.  It involved creating an aggregate table of the top (n)  orders for an item by sum of cost over a select period of time.   So, take the following example :   group <- c(rep(1,10), rep(2,10), rep(3,10)) product
2011 Sep 29
2
String manipulation with regexpr, got to be a better way
Help-Rs,   I'm doing some string manipulation in a file where I converted a string date in mm/dd/yyyy format and returned the date yyyy.   I've used regexpr (hat tip to Gabor G for a very nice earlier post on this function) in steps (I've un-nested the code and provided it and an example of what I did below.  My question is: is there a more efficient way to do this.  Specifically is