similar to: Need a variant of rbind for datasets with different numbers of columns

Displaying 20 results from an estimated 800 matches similar to: "Need a variant of rbind for datasets with different numbers of columns"

2007 Jul 30
1
simple coding question
I have a list of ICD9 (disease) codes with various formats - 3 digit, 4 digit, 5 digit. The first three digits of these codes are what I am most interested in. I would like to either add zeros to the 3 and 4 digit codes to make them 5 digit codes or add decimal points to put them all in the format ###.##. I did not see a function that allows me to do this in the formatting command. This seems
2009 Jul 30
2
weight median by count for multiple records
Hello everyone, I have a .csv file with the following format: uniqueID SubjectID Distance_miles Tag 1 1001 5.5 3 2 1001 7 1 3 1001 6.5 1 4 1001 5 1 5 1002
2007 Aug 27
1
subset question
I would like to code records in a dataset with a 1 if any of the columns 9-67 contain a particular code, and zero if they don't. I've been working with "subset" and it seems that something like subset(data, data[9:67]--"12345") would work, but I have been unsuccessful so far. It seems like a simple problem - any help is appreciated!
2007 Jun 28
2
sampling question
I am interested in locating a script to implement a sampling scheme that would basically make it more likely that a particular observation is chosen based on a weight associated with the observation. I am trying to select a sample of ~30 census blocks from each ZIP code area based on the proportion of women in a ZCTA living in a particular block. I want to make it more likely that a block will
2009 Feb 18
1
multidimensional scaling with long form data
I have a dissimilarity dataset with the form: 1 1 dissimilarity value 1 2 ... 1 3 1 4 2 2 2 3 2 4 ... I would like to do nonmetric multidimensional scaling with this data, but I am having trouble using this format. I would like to either find a function that accepts this format or find a way to easily convert this format to a matrix for use with existing functions. Thanks!
2010 May 28
1
ICD9 codes
Hello: I am working on getting some statistics related to clinical trials and stuff. I have to work with ICD9 codes. Is anyone aware of any R method that deals with ICD9 codes verification and manipulation. Thanks Vishwanath
2009 Jan 14
3
multiple secondary axes
Dear R experts, I want to plot a line chart with another secondary axis placed right to the standard secondary axis which one can access with the axis command, so that the data lines are seen in the same plot. Is there any way to do this in R? Many thanks, Kirsten.
2008 Oct 31
1
replace() error: new columns would leave holes after existing columns
Hello, I have a problem with using replace() to convert a vector of dates from yyyy-mm-dd to julian date. For example, I type replace(x,2004-05-14,134) and I receive an error: Error in `[<-.data.frame`(`*tmp*`, list, value = 134) : new columns would leave holes after existing columns If I can successfully convert, I have a script that will convert all of the dates in
2009 May 20
3
error message re: max(i), but code and output seen O.K.
I have a researcher who is consistently get the warning message: In max(i) : no non-missing arguments to max; returning -Inf Best as I can tell the code is working properly and the output is as expected. I would like some help in understanding why he is getting this error message and what its implications are. I have his code. Sincerely, Kirsten Miles Support Specialist Research Computing Lab
2017 Jul 24
5
Ifelse statements and combining columns
Hi everyone, I'm having some trouble with my ifelse statements. I'm trying to put 12 conditions within 3 groups. Here is the code I have so far: dat$cond <- ifelse(test = dat$cond == "cond1" | dat$cond == "cond2" | dat$cond == "cond3" dat$cond == "cond4" yes = "Uniform" no = ifelse(test =
2017 Jul 13
1
How to make a figure plotting p-values by range of different adjustment values?
Hi Jim, Thanks for your help, I really appreciate it. Perhaps I'm misunderstanding, but does this formula run different ajustment values for this function? logit(p = doc$value, adjust = 0.025) I'm looking to plot the p-values of different adjustment values. Thanks so much, Kirsten On Wed, Jul 12, 2017 at 8:49 PM, Jim Lemon <drjimlemon at gmail.com> wrote: > Hi Kirsten,
2012 Nov 28
3
Conditional model in R
Hello all, I have a data set where the response variable is the percent cover of a specific plant (represented in cover classes 0,1,2,3,4,5, or 6). This data set has a lot of zeros (plots where the plant was not present). I am trying to model cover class of the plant as a function of both total nitrogen and shrub cover. After quite a bit of research I have come across a conditional approach
2017 Jul 12
2
How to make a figure plotting p-values by range of different adjustment values?
Hi all, Thank you for taking the time to read my message. I'm trying to make a figure that plots p-values by a range of different adjustment values. (Using the **logit** function in package **car**) My Statistical analyses were conducted on probability estimates ranging from 0% to 100%. As it's not ideal to run linear models on percentages that are bounded between 0 and 1, these
2010 Feb 21
2
3.3.10 <-> AD 2008 R2 very slow
Hi again, I changed from 3.4.5 to 3.3.10 after an AD upgrade to 2008R2 and prinitng is working mor ore less but it is incredibly sloooow. My server has no remarkable load so it is not due to hardware bottlenecks. Are there any ways to 'tune' 3.3.10 or any tricks to make it faster ? cheers ~christoph -- /* Christoph Beyer | Office: Building 2b / 23 *\ * DESY
2013 Nov 17
1
order() function, decreasing=TRUE unexpected behaviour
There appears to be an issue with the decreasing=TRUE option on the order() function that indicates either a bug or perhaps a design flaw (potentially flawed because I would suggest the majority of users would expect different behaviour). # demonstration of problem: x <- c(2,1,3,4,5) order(x) order(x, decreasing=TRUE) order(x) correctly reports the order as: 2 1 3 4 5 I expected the result
2007 Jul 16
0
FW: summary statistics for groups
Kirsten, this may not be the most elegant approach, but I think I would create dummy variables on the fly for each disease code you have, then use the "with" function to get means. Give this a try: # setup some fake data as an example icd9 <- c(rep("dis1",4), rep("dis2",5), rep("dis3",3)) n <- length(icd9) exposure <- rnorm(n) working <-
2017 Jul 13
0
How to make a figure plotting p-values by range of different adjustment values?
Hi Kirsten, Perhaps this will help: set.seed(3) kmdf<-data.frame(group=rep(1:4,each=20), prop=c(runif(20,0.25,1),runif(20,0.2,0.92), runif(20,0.15,0.84),runif(20,0.1,0.77))) km.glm<-glm(prop~group,kmdf,family=quasibinomial(link="logit")) summary(km.glm) pval<-0.00845 padjs<-NA npadj<-1 # assume you have five comparisons in this family for(method in p.adjust.methods) {
2017 Aug 05
2
Nested for loop
Hi! Thanks for taking the time to read this. The code below creates a graph that takes 100 samples that are between 5% and 15% of the population (400). What I'd like to do, however, is add two other sections to the graph. It would look something like this: from 1-100 samples take 100 samples that are between 5% and 15% of the population (400). From 101-200 take 100 samples that are between
2017 Aug 06
1
Nested for loop
Hi Ben, That's exactly right! Except for each set it's the sample population that is 400, 800 or 300. I want to take 3 samples, each of 100, where only the population differs. I can do this separately, but I'm having trouble putting them all on the same graph. I'd like to have sample on the x axis (1-300) and estimate on the y axis. I want to show how population affects the
2012 Oct 03
2
Legend Truncated Using filled.contour
Hey everyone, I'm working on a contour plot depicting asymptomatic prevalence at varying durations of infectiousness and force of infection. I've been able to work everything out except for this one - my legend title keeps getting cut off. Here's what I have: filled.contour(x=seq(2,30,length.out=nrow(asym_matrix)), y=seq(1,2,length.out=ncol(asym_matrix)), asym_matrix, color =