Displaying 20 results from an estimated 600 matches similar to: "Rank and extract data from a series"
2003 Sep 23
1
AW: Rank and extract data from a series
Hi,
>I would like to rank a time-series of data, extract the top ten data items from this series, determine the
>corresponding row numbers for each value in the sample, and take a mean of these *row numbers* (not the data).
>I would like to do this in R, rather than pre-process the data on the UNIX command line if possible, as I need to >calculate other statistics for the series.
2006 Mar 27
0
not a problem: a submission (PR#8714)
Full_Name: TOBY MARTHEWS
Version: 2.1.1
OS: Windows XP
Submission from: (NULL) (139.133.7.38)
I think you should have better examples on the ?plot man page, if you don't mind
me saying. Can I suggest something like this, which would probably stop so many
emails to the R help about how to put on error bars
Cheers,
Toby M
******************************
xvalsT1=1:3
yvalsT1=c(10,20,30)
2006 Mar 27
2
A plotting question - how to get error bars?
Dear R list,
Can anyone help with a plotting question? I'm trying to display some data
on a plot and I've almost got the format I need (see code below), but 2
things I can't get:
1. How to get "Jan","Feb","Mar" on the x=axis instead of 1:3?
2. How to get "T"s on the end of my error bars like you have in standard
scientific plots?
Any comments
2007 Oct 23
1
How to avoid the NaN errors in dnbinom?
Hi, The code below is giving me this error message:
Error in while (err > eps) { : missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In dnbinom(x, size, prob, log) : NaNs produced
2: In dnbinom(x, size, prob, log) : NaNs produced
I know from the help files that for dnbinom "Invalid size or prob will
result in return value NaN, with a warning", but I am not able
2013 Nov 27
1
Conditional error bars
How can I condition any error bar function that use the arrows() function,
such as 'CI.plot' (see example below) or 'error.bars', to draw only upper
error bar (upper CI) if the bar value (mean) is positive and the lower
error bar (lower CI) if bar value is negative?
CI.plot <- function(mean, se,length, ylim=c(-5, max(CI.H)), ...) {
CI.H <- mean+se
CI.L <- mean-se
2012 Nov 28
3
filter data.frame with a vector
Hello together,
i have a data.frame, which i want to filter with numbers in a vector.
I have a vector (Top10) with these numbers:
[1] 205 302 156 378 235 328 183 375 296 374
and i have a data.frame with a Column (CU_NO) with all my Customer numbers.
How can i filter this data.frame, with the Numbers in my vector.
this one doens't work:
2000 Dec 15
1
resolution of windows metafiles
I am having trouble getting smooth-appearing curves in figures produced as
windows metafiles using R (R-1.1.1 on Windows 98). When I import them into
a word processor (either MS Word 97, or WordPerfect 9.0), the figures
appear only slightly bumpy on screen, but when printed, there is a clear
jaggedness reminiscent of aliasing. Is there a fix for this (if the answer
is "upgrade to 1.2",
2006 Oct 21
0
tcltk: multiple listboxes, selection
Dear list,
I have multiple (BWidget) listboxes in the same toplevel window.
The problem is, if I select (by left clicking) on one of those
listbox elements, the current selection in the *other* listboxes is
cleared!
Anybody knows how I can prevent this?
Here's my code (sorry not complete):
(E.g. If I select an X value, I'd lose the Y value I selected before)
gui.create.tab.general <-
2004 Jun 08
0
interaction plot with intervals based on TukeyHSD
Hi,
The problem is that I would like to do an interaction plot with
intervals based on Tukey's honestly significant difference (HSD)
procedure, but I do not know how to do it in R.
I have 3 factors "A", "B" and "C" and a response variable "response".
I would like to study a model where there are main effects and second
order interaction effects.
2008 Aug 20
3
Confidence Interval
Hi!
With the following script, I'm trying to make a demonstration of a
Confidence Interval, but I'm observing some differences on tails.
# Teste de média entre uma amostra e uma população normal
# Autor: Raphael de Freitas Saldanha
# Agosto de 2008
n <- 200 # Sample size
xbar <- 100 # Sample mean
s <- 2 # Sample SD
nc <- 0.95 # Confidence level (95%
2010 Mar 20
2
different forms of nls recommendations
Hello,
Using this data:
http://n4.nabble.com/file/n1676330/US_Final_Values.txt US_Final_Values.txt
and the following code i got the image at the end of this message:
US.final.values<-read.table("c:/tmp/US_Final_Values.txt",header=T,sep=" ")
US.nls.1<-nls(US.final.values$ECe~a*US.final.values$WTD^b+c,data=US.final.values,start=list(a=2.75,b=-0.95,c=0.731),trace=TRUE)
2005 Jul 28
2
problem with an IF statement?
Can somebody please take a look at this and tell me whats going wrong?
It seems to be parsing wronly around the 'if' statement and gives me a
directory listing.
Thanks in advance
Tom
N.B. datan is an invented dataset
xvals<-c(1,0.4,0.2)
datan<-data.frame(s1=c(3,4,5),s2=c(5,5,5),s3=c(21,55,34),s4=c(5,3,2))
datan$sint<-NA
datan$sgrad<-NA
for(icount in 1:dim(datan)[1]) {
2009 Nov 16
1
No Visible Binding for global variable
While building a package, I see the following:
* checking R code for possible problems ... NOTE
cheat.fit: no visible binding for global variable 'Zobs'
plot.jml: no visible binding for global variable 'Var1'
I see the issue has come up before, but I'm having a hard time discerning how solutions applied elsewhere would apply here. The entire code for both functions is below,
2001 Feb 12
1
3d plots?
Hi all
I'm trying to create a three-dimensional wireframe-type plot,
much like the screenshot shown at
http://www.r-project.org/screenshots/volcano-persp.jpg
In my case, I'm trying to show a density estimate of
two-variable system, using the GenKern package. I've
used the image() and contour() to create a nice shaded plot,
but I've found a 3d plot is often easier for the
2004 Dec 09
2
"sequence of factor settings"?
Hi,
exist in any package a function which "work with sequences".
Easy example 10 factors with 2 levels, are if i'm
correct theoretical 2^10 "sequences" possible.
But i have more than 2 levels and perhaps more than 10 factors and
interested for the top10 "sequence's"
with higehest freqs and wish to know which type of sequence it is.
Many thanks for a
2003 Jul 12
2
help with bivariate density plot question
Dear R users:
I have a dataset with two variables (>20000 observations, two samples from same subject) and I used "kernSur" from library(Genkern) to
get a estimated bivariate density and corresponding plots as follows:
new.data.normal<-data.normal[!is.na(data.normal[,2]),]
x<-new.data.normal[,2]
y<-new.data.normal[,3]
op <- KernSur(x,y, xgridsize=50, ygridsize=50,
2011 Jan 20
1
Scale of 2nd y-axis
Dear list,
My query follows on from a question I posted a few days ago. I have the following 2 sets of data:
wetMeans[1] 9.904762[2] 6.344828[3] 6.346154[4] 6.855769[5] 9.074324[6] 9.953988[7] 13.482966[8] 14.546053[9] 10.841584[10] 9.752033[11] 6.739336[12] 8.955056burnMeans[1] 0.06214286[2] 0.05396552[3] 0.04096154[4] 0.05302885[5] 0.05831081[6] 0.07392638[7] 0.29969940[8] 0.25596217[9]
2010 Sep 29
2
R crashes when loading rgl package before minqa package
Hej,
Calling newuoa (from the minqa package) makes R crash when the package rgl
is loaded first. This however only on certain selected data.
The data used for testing (saved to 'bugs.R'):
xvals = c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36)
yvals =
2011 Jan 18
2
Barplot and line x-axis positions
Hello all,
Hoping that there is a fairly simple solution to my query...
I'm trying to overlay a line plot of some data onto a barplot of different data. The y-axes are different for each set of data but the x-axes are the same (1:12, corresponding with 12 months of observations). The problem I'm having is that the centre of the bars and the points on line don't match up, which is
2011 Jun 21
2
par code help
I am making a barplot using barplot2 from gplots where each bar
represents a specific tree species. I have formatted the species names
on the x-axis so that the genus name is above the species name and
have then rotated the labels 45 degrees to save room. This is my code:
>columncolor<-c("grey20", "grey20", "grey20", "grey70",