similar to: aggregate and median

Displaying 20 results from an estimated 20000 matches similar to: "aggregate and median"

2010 Nov 18
3
Plotting number of patients at risk below survival curve
Dear list, does anyone know of a R-package that has implemented the increasingly popular inclusion of the number of patients at risk below Kaplan-Meier curves like in http://bloodjournal.hematologylibrary.org/content/vol116/issue19/images/large/zh89991058760001.jpeg any hint (or negative answer) is much appreciated. Thanks Thorsten -- Thorsten Raff 2nd Medical Department, University
2011 Jul 31
2
XML and odfWeave
Dear R-helpers, this is just a notice to inform everyone that the current versions of XML and odfWeave don't seem to be playing nice with each other. Since it took me quite some time to figure that out, I thought that I let you know. In my case it helped to install an older version of XML but your mileage of course may vary. Best regards Thorsten -- Thorsten Raff 2nd Medical
2008 Nov 12
3
R- transform data frame into matrix
Hello I have the problem that I want to transform a dataframe as generated by diagnosis <- rep(diagnosis[1:3], 3) marker <- gl(3,3) values <- rnorm(9) dataframe <- cbind(diagnosis, marker, values) dataframe <- dataframe[c(1:5, 7:9), ] into a matrix where levels(diagnosis) is indicating the rows of the matrix, levels(marker) the columns and values are the actual content of the
2012 Mar 27
1
survplot function
Dear R-helpers I am wondering if there is an option to the survplot function in the design package that allows for drawing Kaplan-Meier plots starting from 0 instead of 1, similar like fun = 'event' in the standard plotting function used on a survfit object. I apologize in advance for having missed any obvious informational sources but I really didn't find anything in the
2004 Dec 21
1
aggregate and median
I am trying to use the function aggregate with the median function but I get the following error: Error in FUN(X[[1]], ...) : Argument "INDEX" When I replace median by mean, it works perfectly Can someone tell me where the problem comes from? Thx I am running R 2.0.0 on SunOS 5.9 -- Philippe Hup?? UMR 144 - Service Bioinformatique Institut Curie Laboratoire de Transfert (4??me
2013 Feb 24
0
BA.plot with logarithmic axes (MethComp)
Dear R-helpers, I am trying to plot a Bland-Altman-Plot using the BA.plot function from the package MethComp. While there is a function to transform the values for analysis as shown in the snippet below, I would like to have logarithmic axes for display as well. The usual log = 'xy' does not work because of the properties of the y-asxis (positive and negative values). I am sure that
2008 Sep 16
0
Package implementing unconditional tests for comparing two binomials
Hello, I am looking for a package implementing unconditional tests for comparing two binomials (Barnard's test or derivatives). As I am looking for rare genotypes within my groups, my number of subjects in one of the cells of the 2x2 table is often 2-4 resulting in a too conservative result by Fisher's exact test due to the discrete sample space of the test statistic. As I want to use
2008 Mar 09
2
transforming column of a dataframe by var- and median-functions
Hello, I try to transform a data frame like A B C 1 1 2,5 2 2 NA 3 1 1,0 4 1 56 5 2 23 6 1 NA 7 2 46 to the following dataframe, calculating the variance and median of the C-column, group by B, so the result will be: B C(median) D (var) 1 19,83
2008 May 16
3
aggregate(), with multiple functions in FUN?
I've got a data frame having numerical data by zip code: ZIP DATA 94111 12135.545 93105 321354.65654 94111 545.555 94706 558858.66 ... ... I'm using this function to group records by ZIP and calculate the median of DATA: aggregate(d$DATA, list(Zip = d$ZIP), FUN=median, na.rm=T) but what I really want to do is to calculate several statistics (median,
2010 Jul 16
2
aggregate(...) with multiple functions
hi all - i'm just wondering what sort of code people write to essentially performa an aggregate call, but with different functions being applied to the various columns. for example, if i have a data frame x and would like to marginalize by a factor f for the rows, but apply mean() to col1 and median() to col2. if i wanted to apply mean() to both columns, i would call: aggregate(x, list(f),
2007 Sep 08
1
Problem with the aggregate command
Dear friends, I have a data set with 23 columns and 38000 rows. It is a panel running from the years 1991 through 2005. I want to aggregate the data and get the medians of each of the 23 columns for each of the years. In other words my output should be like this Year Median 1991 123 1992 145 1993 132 etc. The sample lines of code to do this operation is set1 <-
2013 Jun 26
1
Error when using median as aggregation function in dcast
Hi, I am trying to calculated various summary statistics using the dcast function of reshape2. This works perfectly for getting the mean, sum, length, sd. But when I want to calculate the median I get an error. I tried it with and without removing NAs: my_median <- function(x) median(x, na.rm = FALSE) median_df <- dcast(patch_stats_dfm,formula=species~input+barriers,my_median) Error in
2010 Jan 30
2
aggregate by factor
I have a data frame with two columns, a factor and a numeric. I want to create data frame with the factor, its frequency and the median of the numeric column > head(motifList) events score 1 aeijm -0.25000000 2 begjm -0.25000000 3 afgjm -0.25000000 4 afhjm -0.25000000 5 aeijm -0.25000000 6 aehjm 0.08333333 To get the frequency table of events: > motifTable <-
2007 May 02
1
Get the difference of values to their own median value
Hello, I've got a matrix (mail end) with the colnames x, y, z. In this matrix are different measurements. x and y are risign coordinates. With the following line I got the median value of z for all "x" AND "y" witch are the same (not every measurment in my list hast the same number of "x" and "y" values. Sometimes lines are missing. >MEDIAN <-
2012 Feb 23
2
Aggregate with Function List ?
R Experts I wish to tabulate into one data frame statistics summarizing concentration data. The summary is to include mean, standard deviation, median, min and max. I wish to have summaries by Dose, Day and Time. I can do this by calling aggregate once for each of the statistics (mean, standard deviation, median, min and max) and then execute 4 merges to merging the 5 data frames into
2011 Oct 31
1
Question on estimating standard errors with noisy signals using the quantreg package
Dear all, My question might be more of a statistics question than a question on R, although it's on how to apply the 'quantreg' package. Please accept my apologies if you believe I am strongly misusing this list. To be very brief, the problem is that I have data on only a random draw, not all of doctors' patients. I am interested in the, say, median number of patients of
2010 Oct 22
1
Problem with Aggregate - Sum, limit on number of criteria
Hello, It appears there is a limit in the number of criteria that can be put into the Aggregate sum function. (It looks like it is 32). My code is; HSfirst=aggregate(count,
2008 Jun 10
1
Problem with by(... , median)
Hello everyone, I am new to R, I have been using SAS for a while. Not surprisingly, I find R much better in graphics, which is publication ready right away. Recently, I have been trying to calculate some basic statistics using R. I have a dataset of multiple rows per subject. For example: Subject Date Factor1 Factor2 Factor3 P1 0.5 1 1 3 P1 1 3 2 5 P1 2 3 5 NA ... P2 0.5 1 6 4 P2 1 2 NA 7 P2
2010 Nov 29
4
subset
?Hi: I always use subset the same way but now is returning 0 rows. What's wrong with the way I am subsetting? library(ggplot2) structure(list(first = c(38.2086, 43.1768, 43.146, 41.8044, 42.4232, 46.3646, 38.0813, 40.0745, 40.4889, 38.6246, 40.2826, 41.6056, 34.5353, 40.0768), second = c(43.3295, 42.4326, 38.8994, 37.0894, 42.3218, 46.1726, 39.1206, 41.2072, 42.4874, 40.2657, 38.7766,
2010 Feb 03
2
Creating a table with median for multiple variables
I need to create a table using median "votes" by "party" I have a large dataset with 7 different parties and 464 different vote numbers. Any suggestions? -- View this message in context: http://n4.nabble.com/Creating-a-table-with-median-for-multiple-variables-tp1461994p1461994.html Sent from the R help mailing list archive at Nabble.com.