similar to: Problem with Median

Displaying 20 results from an estimated 8000 matches similar to: "Problem with Median"

2012 May 07
3
Problem in executing R-script
Hello. I'm a newbie here. In my script (I name it readData.R), I wrote the followings: readData <-function(){ med = read.csv("medicalData.csv");} Then I tested the script by 'Source R Code' then on the command I typed 'readData()' then I typed 'med' to check if the variable contains the medical data but it returned 'Object med is not found'. What
2008 May 13
1
Compare columns
Dear R-users, I have the following 2 files; A V1 V2 A 1 A 2 A 3 A 4 B 1 B 4 C 1 C 3 D 4 B V1 V2 process1 1 process2 2 process3 3 process4 4 I want to get this output C V1 V2 V3 A 1 process1 A 2 process2 A 3 process3 A 4 process4 B 1 process1 B
2008 Mar 18
3
Partition data into clusters
Greetings R-users, I have been using the fpc package in R to cluster my data. Speficically I am using kmeansruns clustering. I would like to know how I use R to partition data into clusters. What I am doing is as follows. # Use csv file as input ##################### wholeset = read.csv("Spellman800genesImputed.csv") # exclude first col (gene names) ##########################
2006 Mar 06
1
maximum likelihood estimate
Hi! Recently I try to find the method maximum likelihood for gamma,weibull,Pearson type III,Kappa Distribution, mixed exponential distribution, skew distribution. I have tried function ms() for gamma two parameters and weibull two parameters.It works but not for Pearson type III. I have problem to find the likelihood function for mixed exponential distribution and kappa distribution. So can
2004 Jun 24
3
The "median" function in R does not work properly.
Hi, 1.) The "median" function does not work well. Please refer to the data below (same data is attached as txt-delimited). This is what I try to do in R: median ( dataf [2:9] ) I get warning: "needs numeric data" 2.) BUT if apply the median to a single vector: median ( dataf [,2]] ) then it works: 3.) How come the "median"
2007 May 08
3
Median
Hello. I need calculate the median of several column of a data.frame, in a new column of this data frame, but the median operator only calculate from a vector. I have made a functionc that calculate the median but it is very slow. Are there any method in any package to calculate this? Best regards. Jose Sierra. A B C -0.01678042
2013 Mar 21
2
Displaying median value over the horizontal(median)line in the boxplot
Hi, set.seed(45) test1<-data.frame(columnA=rnorm(7,45),columnB=rnorm(7,10)) #used an example probably similar to your actual data apply(test1,2,function(x) sprintf("%.1f",median(x))) #columnA columnB # "44.5"? "10.2" par(mfrow=c(1,2)) lapply(test1,function(x) {b<-
2009 Jul 20
2
calculating median with a condition
Hello, I am trying to calculate the median of numbers across each row for the data shown below , with the condition that if the number is negative, that it should be ignored and the median should be taken of only the positive numbers. For eg: data is in Column A,B,C. Column D and E demonstrates what I want to get as answer A B C Median median value -13.6688115 -32.50914055
2010 May 27
1
median test
Hi all, I have found the following function online median.test<-function(y1,y2){ z<-c(y1,y2) g <- rep(1:2, c(length(y1),length(y2))) m<-median(z) fisher.test(z<m,g)$p.value } in http://www.mail-archive.com/r-help@r-project.org/msg95278.html I have the following data > group1 <- c(2, 2, 2, 1, 4, 3, 1, 1) > group2 <- c(3, 1, 3, 1, 4, 1, 1, 1, 7, 1, 1, 1, 1,
2003 Sep 27
2
CI on median
Dear friends, I'm probably wrong but is there anything better than bootstrap to get a confidence interval of the median from a population with unspecified distribution ? Best wishes Troels Ring, Aalborg, Denmark
2009 Aug 21
4
help with median for each row
Hi, I tried looking through google search on whether there's a way to computer the median for each row of a nxn matrix and return the medians for each row for further computation. And also if the number of columns in the matrix are even, how could I specify which median to use? Thank you very much! -- Edward Chen [[alternative HTML version deleted]]
2006 Jun 30
5
median of gamma distribution
Doese anyone know a R function to find the median of a gamma distribution? [[alternative HTML version deleted]]
2010 Apr 08
1
Question about simple.median.test
I am studying "Using R for Introductory Statistics" and find it in general very useful. At present, I am stumbling over the function simple.median.test. > x [1] 12.8 3.5 2.9 9.4 8.7 0.7 0.2 2.8 1.9 2.8 3.1 15.8 > simple.median.test (x,median=5) [1] 0.3876953 > simple.median.test (x,median=10) [1] 0.03857422 until here it is identical to the document. Then I
2009 Apr 14
2
any other fast method for median calculation
Hi there, I got a data frame with more than 200k columns. How could I get median of each column fast? mapply is the fastest function I know for that, it's not yet satisfied though. It seems function "median" in R calculates median by "sort" and "mean". I am wondering if there is another function with better algorithm. Any hint? Thanks, Xin Zheng
2012 Feb 04
2
How to Compare the median to the mean?
Okay, so I have a homework projecr for R, and we had to input the following link as some sort of data: nb10 <- read.table("http://www.adjoint-functors.net/su/web/314/R/NB10"). Afterwards, we have to use fivenum(nb10) to find max, min, quantiles, and sd, but I'm okay with this. The next question is where I'm stuck. The question is as follows; Compare the median (use the
2006 Mar 22
3
ordering boxplots according to median
Dear R-users, Does anyone knows how I can order my serie of boxplots from lowest to highest median (which is much better for visualization purposes). thanks in advance, willem [[alternative HTML version deleted]]
2012 Oct 15
2
median between matrix column
Dear useRs, 1. how to calculate single median value for two columns of a matrix? 2. i have a matrix of 16 columns and 365 rows, how to calculate median between columns 1 and 16, 2 and 16, 3 and 16, 4 and 16, 5 and 16 till 15th column. is there a loop command to do the said operation? regards eliza [[alternative HTML version deleted]]
2008 Sep 18
3
Oja median
Hi, Can we get the code for calculating Oja median for multivariate data Thanks and Regards Rahul Agarwal Analyst Equities Quantitative Research UBS_ISC, Hyderabad On Net: 19 533 6363 [[alternative HTML version deleted]]
2013 Feb 18
1
lattice dotplot labelling median and mean values for each panel
By considering this reproducible example #start code library(lattice) dotplot(variety ~ yield | site, data = barley, layout = c(1,6), index.cond= function(x,y){median(x)}, panel = function(x,y,...) { panel.dotplot(x,y,...) median.values <- median(x) panel.abline(v=median.values, col.line="red")
2017 Feb 15
2
stats::median
The generic stats::median method is defined as median <- function (x, na.rm = FALSE) {UseMethod("median")} I suggest that this should become median <- function (x, na.rm = FALSE, ...) {UseMethod("median")} This would allow additional S3 methods to be developed with additional arguments. Currently I have to over-ride this generic definition in the demography