search for: jonathanmflowers

Displaying 7 results from an estimated 7 matches for "jonathanmflowers".

2010 Jul 09
2
select columns from vector of column names
Hi I want to extract columns from a data frame using a vector with the desired column names. This short example uses the select argument in the subset function to accomplish what I am trying to do. Is there a better solution? #names of desired columns colnames <- c("col1","col3") #my data data <-
2011 May 16
2
rbind with partially overlapping column names
Hello, I would like to merge two data frames with partially overlapping column names with an rbind-like operation. For the follow data frames, df1 <- data.frame(a=c("A","A"),b=c("B","B")) df2 <- data.frame(b=c("b","b"),c=c("c","c")) I would like the output frame to be (with NAs where the frames don't
2011 May 16
0
Fwd: Re: rbind with partially overlapping column names
...he list on this; must have hit 'Reply' instead of 'Reply All'. P Ehlers -------- Original Message -------- Subject: Re: [R] rbind with partially overlapping column names Date: Mon, 16 May 2011 11:14:11 -0600 From: Peter Ehlers <ehlers at ucalgary.ca> To: Jonathan Flowers <jonathanmflowers at gmail.com> On 2011-05-16 08:56, Jonathan Flowers wrote: > Hi all, > > Thanks for your responses. The merge output works for the test case as Bill > pointed out, but is contingent on non-overlapping values. Thanks for > pointing this out Ian. My actual dataset needs to allow...
2011 Jan 15
3
get list element names within lapply / sapply call
Hi all, I would like to iterate through a list with named elements and access the names within an lapply / sapply call. One way to do this is iterate through the names and index the list with the name. Is there a way to iterate through the list elements themselves and access the element names within in the function? For example, mylist <-
2010 Jul 09
1
select columns from dataframe
Hi, I would like to extract columns from a dataframe using a vector of desired column names. The following working example uses the select argument in the subset function to accomplish what I am trying to do. Is there a better solution? Thanks. #my data data <- data.frame("col1"=c(1,2,3),"col2"=c("A","B","C"),"col3"=c(4,5,6))
2010 Nov 27
1
d.f. in F test of nested glm models
Dear all, I am fitting a glm to count data using poison errors with the log link. My goal is to test for the significance of model terms by calling the anova function on two nested models following the recommendation in Michael Crawley's guide to Statistical Computing. Without going into too much detail, essentially, I have a small overdispersion problem (errors do not fit the poisson
2010 Sep 25
1
margin control in lattice package
Hi all, I am difficulty with simple layout of plots in the lattice package I have created a series of levelplots and would like to plot them to a single device, but need to reduce the margin areas. This is easily accomplished with par(oma) and par(mar) in the base graphics package but I am having problems finding the equivalent features in the lattice package. Ideally, I would like to reduce