Displaying 20 results from an estimated 3000 matches similar to: "Storing output in an array or matrix"
2000 Dec 11
1
qqline (PR#764)
I think qqline does not do exactly what it is advertised to do ("`qqline'
adds a line to a normal quantile-quantile plot which passes through the
first and third quartiles."). Consider the graph:
tmp <- qnorm(ppoints(10))
qqnorm(tmp)
qqline(tmp)
The line (which I expected go through all the points), has a slightly
shallower slope than does the points plotted by qqnorm. I think
2012 Jan 13
1
Quantiles in boxplot
Hi,
I have a simple question about quartiles in R, especially how they are calculated using the boxplot.
Quartiles
(.25 and .75) in boxplot are different from the summary function and
also don't match with the 9 types in the quantile function.
See attachment for details.
Can you give me the details on how the boxplot function does calculate these values?
Cheers,
Rene Brinkhuis
2010 Jan 22
2
Quartiles and Inter-Quartile Range
Why am I getting a wrong result for quartiles?
here is my code:
> cbiomass = c(910, 1058, 929, 1103, 1056, 1022, 1255, 1121, 1111, 1192,
> 1074, 1415)
> summary(cbiomass)
> IQR(cbiomass)
The result R gives me is:
For the summary
> Min. 1st Qu. Median Mean 3rd Qu. Max.
910 1048 1088 1104 1139 1415
For IQR
> 91.25
*********
The true Q1 is 1039
2007 Jun 16
2
Visualize quartiles of plot line
Hello,
I'm currently using a simple plot to visualize some mean values. I'm
having ~200 datapoints on the x-axis, each has 10 records. I'm
currently plotting only the mean value of each of the datapoints.
What I need is a way to visualize the quartiles/error/whatever of
these points. I thought about boxplots, but I have to many points on
the xaxis - it would be impossible to see
2008 Nov 03
1
quantcut
I'm trying to devide x into tertiles, but ends up with integer limits
even x holds one decimal. The analysis is extremely sensitive to the
limits and I like to keep them right. How can that be done?
quartiles <- quantcut( x[x >= 0], q=seq(0,1, by=(1/3))
> table(quartiles)
quartiles
[180,344] (344,448] (448,644]
16467 16476 16452
[[alternative HTML version deleted]]
2007 May 14
1
Nicely formatted summary table with mean, standard deviation or number and proportion
Dear all,
The incredibly useful Hmisc package provides a method to generate
summary tables that can be typeset in latex. The Alzola and Harrell book
"An introduction to S and the Hmisc and Design libraries" provides an
example that generates mean and quartiles for continuous variables, and
numbers and percentages for count variables: summary() with method =
'reverse'.
I
2011 Oct 31
3
How to get Quartiles when data contains both numeric variables and factors
When data contains both factor and numeric variables, how to get quartiles
for all numeric variables?
n <- 100
x1 <- runif(n)
x2 <- runif(n)
x3 <- x1 + x2 + runif(n)/10
x4 <- x1 + x2 + x3 + runif(n)/10
x5 <- factor(sample(c('a','b','c'),n,replace=TRUE))
x6 <- factor(1*(x5=='a' | x5=='c'))
data1 <- cbind(x1,x2,x3,x4,x5,x6)
data
2010 Jan 25
1
summing a large, partitioned data frame
Dear R community,
I'm trying to develop a fast way of summing specific rows of a large data frame.
Here is an example of the kind of data frames I'm dealing with:
> refls
H K L M/ISYM BATCH I SIGI
43247 1 0 5 21 79 61.44117 2.20553
1040 1 0 5 257 6 15.16316 0.54431
2324 1 0 5 257 5 46.76152 1.67858
31515 1 0 5 259 60 57.97305
2007 Feb 12
6
Boxplot: quartiles/outliers
For boxplot(), is it possible to pass in a parameter to change the default
way that the 1st and 3rd quartiles are computed? (specifically, I'd like to
use type 6 described in the quantile function).
Also, what are the options for how outliers are computed, and how can one
change them?
Thank you
[[alternative HTML version deleted]]
2010 Oct 26
2
Forcing results from lm into datframe
Hi
I need some help getting results from multiple linear models into a dataframe.
Let me explain the problem.
I have a dataframe with ejection fraction results measured over a number of quartiles and grouped by base_study.
My dataframe (800 different base_studies) looks like
> afvtprelvefs
basestudy quartile ef ef_std entropy
CBP0908020 1 21.6 0.53 3.27
2002 Feb 21
2
help understanding box plots
Another naive stats question. I'm trying to better understand what
boxplots are telling me.
I think what I see is the median and the boundaries of the 1st and 3rd
quartiles. The whiskers represent the range of the data unless there
are points which are outside "range" (default: 1.5) times the distance
from the median to that quartile. Is that right? I've read the
2004 Nov 28
3
Correct Syntax for a Loop
I'll appreciate if some one can help me with the
following loop. This is the logic of the loop,
if we have the following data;
> x.df
x.dif
. .
. .
102 0.00
103 0.42
104 0.08
105 0.00
106 0.00
107 0.00
108 -0.16
109 -0.34
110 0.00
111 -0.17
112 -0.33
113 0.00
114 0.00
115 0.00
116 0.33
117 0.17
118 0.00
. .
. .
I'm trying to find i's where
for (i
2006 Jan 12
4
Loading Excel file into Limma
Dear mailing group,
This is my first time here. Glad to have this resource!
I am currently trying to load an Excel file into R (limma package loaded)
using the source(*name of directory*) command, but it cannot open the file.
I renamed the file as .R and .RData, to no avail. The Excel data contains
one gene name per row and about 100 data points per gene (columns).
I am only used to
2011 May 27
2
if you don't give yourself annoyance, others also can never
yes, I narrowed eyes and see the world again. I's eyes narrowed, at present of scenery was draped one hazy cloak, a fairly beautiful come out in the wash. As long as the phenomenon don't essence, some things, some things, some people don't need to see as well, as long as I see things scenery beautiful that side.
www.ebuybus.com
2009 Jun 17
1
function to determine to which class/category a value belongs to?
Hi all,
I''ve got a simple contingency table produced with table(), and the upper and
lower quartiles (quantile25 and quantile75) for the same dataset.
Is there a function that tells me in which category does the value of the
quartile falls into?
for example:
tabsp <- table(fam$I[fam$I>0])
1 3 6
6 1 1
and for the cumulative frequency distribution
tabcum <- cumsum(tabsp)
1 3
2012 Nov 09
2
sink() doesn't work
Oftentimes I want to make outputs to be displayed on the R console.
However, after I execute a program with a sink command in it the R console
becomes unresponsive. Meaning that the following occurs in R console:
> source("Program_containing_sink.R")
> a<-1
> a
>
>sink()
>a
>
R help says that sink() will bring output back to the console but i's not
2008 Aug 05
5
boxplot with average instead of median
I really like the ease of use with the boxplot command in R. I would
rather have a boxplot that shows the average value and the standard
deviation then the median value and the quartiles.
Is there a way to do this?
Chad Junkermeier, Graduate Student
Dept. of Physics
West Virginia University
PO Box 6315
210 Hodges Hall
Morgantown WV 26506-6315
phone: (304) 293-3442 ext. 1430
fax: (304)
2007 Apr 06
5
Labelling boxplot with fivenumber summary
I am very new to R so forgive me if this seems basic but I have done extensive searching and failed to come up with the answer for myself.
I am trying to label a boxplot I have created with the values for the median, upper and lower quartiles and max and min values. I have been unable to do this or find anything on the net to say how it might be done. Is this possible and if so how? Regards,
2011 Apr 28
1
Extract complete rows by group and maximum
Hi
I'm trying to extract complete rows from a dataframe by group based on
the maximum in a column within that group.
Thus I have a dataframe:
cvd_basestudy ... es_time ...
_____________
study1 ... 0.3091667
study2 ... 0.3091667
study2 ... 0.2625000
study3 ... 0.3033333
study3 ... 0.2625000
__________
etc
I can extract the basestudy and the max(es_time)
2005 Apr 21
2
Deciles and R
Hi everyone,
I'm a new R user (if this is a really basic question, please do excuse
me...) and I'm having some questions regarding a deciles problem.
I have a variable which I need to categorize according to its deciles (X).
However, this categorization should be made into another variable (call it
NewVar).
Ex. for the quartiles case (just for the sake of exposition, since I need