search for: delre

Displaying 20 results from an estimated 20 matches for "delre".

Did you mean: dele
2011 Sep 25
4
selecting first row of a variable with long-format data
Hi, I am trying to select the first row of a variable with data in long-format, e.g., # sample data id <- c(1,1,1,2,2) value <- c(5,6,7,4,5) dat <- data.frame(id, value) dat How can I select/subset the first 'value' for each unique 'id'? Thanks, AC [[alternative HTML version deleted]]
2010 Feb 20
3
aggregating using 'with' function
Hi All, I am interested in aggregating a data frame based on 2 categories--mean effect size (r) for each 'id's' 'mod1'. The 'with' function works well when aggregating on one category (e.g., based on 'id' below) but doesnt work if I try 2 categories. How can this be accomplished? # sample data id<-c(1,1,1,rep(4:12)) n<-c(10,20,13,22,28,12,12,36,19,12,
2003 Oct 05
2
not sure
I just received an e-mail from V.K. Quach and I am not really sure what it meant. So if anyone can help me I would really appreciate it. I just sent out a message to the list regarding a newbie question. The reply I received was as follows: Ich bin bis 17. Okt. 2003 abwesend. In dringenden F?llen wenden Sie sich bitte an Hr. Kay Vetter (770) oder Hr. Sascha Huter (778) V. K. Quach Thank
2010 Mar 17
2
Retaining variable name in a function
Hi All, Im interested in creating a function that will convert a variable within a data.frame to a factor while retaining the original name (yes, I know that I can just: var <-factor(var) but I need it as a function for other purposes). e.g.: # this was an attempt but fails. facts <- function(meta, mod, modname = "spec") { meta$mod <- factor(meta$mod)
2008 Feb 20
2
purging unmanaged cron
Should this work? # --- remove any cronjobs that are not managed by puppet. resources { "cron": purge => true } I get the following error. Resources[cron]: Failed to generate additional resources: You must specify a title for objects of type Puppet::Type::Cron Ben
2011 Nov 03
2
Take variables in data.frame and create list of matrices
Hi, I have this sample data below and would like to create a list of matricies. setseed(1254) id <- c(1,1,1,1 ,2,2,2) o <- as.factor(c(1:4, 1, 3, 4)) r <- rep(.5, 7) v <- rnorm(7) s <- rnorm(7) dat <-data.frame(id, o, r, v, s) dat #> dat # id o r v s # 1 1 0.5 0.7024631 2.0813672 # 1 2 0.5 -0.5541955 0.1095156 # 1 3 0.5 -1.0418167 0.4164930 # 1
2010 Feb 25
2
reducing data.frame
Hi All, Is there an easy way to reduce a data.frame to 1 'id' per row while keeping information from the other rows of that same variable, if applicable? e.g.: # data multi[1:15,] id r n wi wi.tau z k alliance a.rater eml treatment outcome o.rater german 1 100 0.2800000 44 41 21.72514 0.2876821 210 <NA> <NA> <NA> <NA>
2010 Mar 04
0
ifthen() question -- whoops--ifelse()
...aggs(g=g[id==st[i]], n.1= n.1[id==st[i]], n.2 = n.2[id==st[i]], cor)[2]) out$n.1[i] <- round(mean(n.1[id==st[i]]),0) out$n.2[i] <- round(mean(n.2[id==st[i]]),0) } return(out) } AC On Thu, Mar 4, 2010 at 9:35 AM, AC Del Re <delre@wisc.edu> wrote: > Hi All, > > I am using a specialized aggregation function to reduce a dataset with > multiple rows per id down to 1 row per id. My function work perfect when > there are >1 id but alters the 'var.g' in undesirable ways when this > condition is not...
2008 Mar 12
1
Problem when calling FORTRAN subroutine (dll)
Hello, I am trying to call a FORTRAN subroutine from R. The Fortran code is @: http://lib.stat.cmu.edu/apstat/206 It performs a bivariate isotonic regression on a rectangular grid (m X n) matrix. I used the g77 compiler and successfully created a dll file and it also loads successfully from R. But somehow the programs fails to run properly. (I do get the correct result when I compile the
2011 Nov 22
4
Removing rows in dataframe w'o duplicated values
Hi, Is there an easy way to remove dataframe rows without duplicated values of a specified column ('id')? e.g., dat <- data.frame(id = c(1,1,1,2,3,3), value = c(5,6,7,4,5,4), value2 = c(1,4,3,3,4,3)) dat id value value2 1 1 5 1 2 1 6 4 3 1 7 3 4 2 4 3 5 3 5 4 6 3 4 3 This is sample data and the real data has hundreds of
2010 Mar 04
1
ifthen() question
Hi All, I am using a specialized aggregation function to reduce a dataset with multiple rows per id down to 1 row per id. My function work perfect when there are >1 id but alters the 'var.g' in undesirable ways when this condition is not met, Therefore, I have been trying ifthen() statements to keep the original value when length of unique id == 1 but I cannot get it to work. e.g.:
1998 Mar 17
26
Newbie Question
Does Samba allow me to mount NT (disks) file systems on my Unix (SGI) box? Randy -- Randy Fox Coryphaeus Software, Inc. Sr. Software Engineer 985 University Ave. Suite 31 rfox@coryphaeus.com Los Gatos CA, 95030 www.coryphaeus.com Tel: 408/395-4537 Fax: 408/395-6351
2010 Mar 24
0
R-help ordinal regression
...the posting guide http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, > reproducible code. > > > > > > ------------------------------ > > Message: 46 > Date: Tue, 23 Mar 2010 12:57:47 -0500 > From: AC Del Re <delre at wisc.edu> > To: r-help at r-project.org > Subject: [R] Displaying equations from .Rd files > Message-ID: > ??? <85cf8f8d1003231057o501b30b9xc493423b29b0fb3d at mail.gmail.com> > Content-Type: text/plain > > Hi All, > > I am reading through section 2.6 (Mathe...
2010 Jul 09
1
output without quotes
Hi All, I am interested in printing column names without quotes and am struggling to do it properly. The tough part is that I am interested in using these column names for a function within a function (e.g., lm() within a wrapper function). Therefore, cat() doesnt seem appropriate and print() is not what I need. Ideas? # sample data mod1 <- rnorm(20, 10, 2) mod2 <- rnorm(20, 5, 1) dat
2010 Mar 23
1
Displaying equations from .Rd files
Hi All, I am reading through section 2.6 (Mathematics) of the "Writing R Extensions" manuscript and am wondering where I can find more examples/documentation on the \deqn{ } function. I would like to learn how to display equations using this function but am not sure how to go about doing it. The one example provided in section 2.6 doesn't give me much of a sense on how to do this.
2010 Feb 15
1
R-Commander plug-in difficulties
Hi All, I have recently created an Rcmdr plugin package and it passed all the checks and was uploaded to CRAN. I then downloaded it from CRAN and tried running it from my local R program and received this error: ... Error in f(libname, pkgname) : could not find function "getRcmdr" Error in library(pkg, character.only = TRUE) : .First.lib failed for 'RcmdrPlugin.MAc' In my
2009 Nov 25
1
reshape question
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091124/38de5e23/attachment-0001.pl>
2010 Feb 17
1
Replicating output from a function
Hi All, I have a function that is used with data frames having multiple id's per row and it aggregates the data down to 1 id per row. It also randomly selects one of the within-id values of a variable (mod), which often differ within-id. Assume this data frame (below) is much larger and I want to repeat this function, say 100 times, and then derive the mean values of r over those 100
2010 Feb 15
2
creating functions question
Hi All, I am interested in creating a function that will take x number of lm objects and automate the comparison of each model (using anova). Here is a simple example (the actual function will involve more than what Im presenting but is irrelevant for the example): # sample data: id<-rep(1:20) n<-c(10,20,13,22,28,12,12,36,19,12,36,75,33,121,37,14,40,16,14,20)
2009 Oct 04
2
Row to Column help
Dear R Community, I am attempting to transpose a dataset from rows to columns but am stuck. I have tried using reshape() with little luck, possibly due to the categorical nature of the data. For example: id<-c(1,2,2,3,3,3) author<-c("j","k","k","l","l","l")