Displaying 20 results from an estimated 20000 matches similar to: "extracting names from matrix according to a condition"
2009 Nov 20
6
How to add a top level title to multiple plots
How can I add an overall plot title to these four plots?
I would like to have something that says, "Distribution Comparisons":
par(mfrow = c(2, 2))
# Plot 1
plot(rnorm(10),type="l",col="red")
title(main = list(paste("Normal"),
????????????????????????? col="black", cex = 1.0))
# Plot 2
plot(rpois(10,
2011 May 05
6
Averaging uneven measurements by time with uneven numbers of measurements
I have a new device that takes measurements anywhere from every second, to
every 15 minutes (depending on changes). The matrix has a date, time and Y
column (Y is the measurement). For three days it is 25,000 rows. How do I
average the measurements by every 30 minutes so my matrix is 48 rows per
day? I have been working on this and cannot figure out a simple method. Any
ideas? Thank you.
-----
In
2010 Feb 12
1
Using seq_len() vs 1:n]
Pat Burns makes a good point. -Peter
-------- Original Message --------
Subject: Re: [R] Using seq_len() vs 1:n
Date: Fri, 12 Feb 2010 09:01:20 +0000
From: Patrick Burns <pburns at pburns.seanet.com>
To: Peter Ehlers <ehlers at ucalgary.ca>
References: <4B746AEF.10900 at ucalgary.ca>
If you want your code to be compatible with
S+, then 'seq_len' isn't going to work.
2010 Jun 02
4
Draw text with a box surround in plot.
text() can draw text on a plot.
Do we have a way/function to draw text with a box surround it?
Thanks,
-james
2004 Nov 24
2
text() with invalid argument type crashes RGui.exe
Dear Rexperts:
(R 2.0.1 on Windows XP Pro)
Is the following problem unique to my setup?
If it's a known problem, I didn't see it at
http://bugs.r-project.org/ nor find discussion in the archives.
plot(1:10)
loc <- c(5, 6)
text(loc, labels = "a")
Produces expected results according to ?xy.coords.
plot(1:10)
loc <- list(x = 5, y = 6)
text(loc, labels = "a")
No
2011 Jan 17
1
median by geometric mean -- are we missing what's important?
Folks:
I know this may be overreaching, but are we missing what's important?
WHY do the zeros occur? Are they values less then a known or unknown
LOD? -- and/or is there positive mass on zero? In either case, using
logs to calculate a geometric mean may not make sense. Paraphrasing
Greg Snow, what is the scientific question? What is the model?
Cheers,
Bert
On Mon, Jan 17, 2011 at 9:13 AM,
2006 May 31
2
a problem 'cor' function
Hi list,
One of my co-workers found this problem with 'cor' in his code and I confirm it too (see below). He's using R 2.2.1 under Win 2K and I'm using R 2.3.0 under Win XP.
===========================================
> R.Version()
$platform
[1] "i386-pc-mingw32"
$arch
[1] "i386"
$os
[1] "mingw32"
$system
[1] "i386, mingw32"
$status
2012 Oct 23
4
Changing radii line type in radial plots
Hello all,
Is it possible to change the radii line type in radial plots? I wasn't able
to find anything online.
Thanks,
Bern
--
View this message in context: http://r.789695.n4.nabble.com/Changing-radii-line-type-in-radial-plots-tp4647238.html
Sent from the R help mailing list archive at Nabble.com.
2012 Apr 27
1
Hyperspec package: need to change spectra names in a stacked plot
Hi all,
I need to insert the name of spectra in a stacked plot obtained with
hyperspec.
I use this command
plot(spectra [c(-1:-4, -6:-8, -10:-12, -14:-16)], stacked = T)
but, in this way R draw nameless spectra on the Y axis.
How can I solve the problem?
Thank you for any suggestion.
Best regards,
Roberto
--
View this message in context:
2013 Apr 01
1
Factor to numeric conversion - as.numeric(levels(f))[f] - Language definition seems to say to not use this.
Note the edited subject line! I don't know why I typed it as it was before.
This says that as.numeric(as.character(f)) will work regardless of the
implementation, and I agree.
It's the recommendation to use as.numeric(levels(f))[f] that has me
wondering about section 2.3.1 of the language definition. I expect that
this idiom is in widespread use, and perhaps the language definition
2006 Feb 03
5
pbinom with size argument 0 (PR#8560)
Full_Name: Uffe H?gsbro Thygesen
Version: 2.2.0
OS: linux
Submission from: (NULL) (130.226.135.250)
Hello all.
pbinom(q=0,size=0,prob=0.5)
returns the value NaN. I had expected the result 1. In fact any value for q
seems to give an NaN. Note that
dbinom(x=0,size=0,prob=0.5)
returns the value 1.
Cheers,
Uffe
2002 Oct 30
1
typo in p.adjust (PR#2231)
Full_Name: Peter Ehlers
Version: 1.6.0
OS: Windows 2000 Pro
Submission from: (NULL) (136.159.61.178)
In:
p.adjust package:base R Documentation
In the paragraph:
Hochberg's and Hommel's methods are valid when the hypothesis tests
are independent or when they are non-negatively associated (Sarkar,
1998; Sarker and Chang, 1997). Hommel's method is
2011 May 07
2
Convenience-at-the-expense-of-clarity (was: quantmod's addTA plotting functions)
Thanks, Writing plot(addTA()) worked fine.
I find myself with such mixed feelings about R. After finding that addTA
worked fine at the command line but not in a function, I puzzled for a long
time about what kind of virtual machine structure could possibly account for
that. I couldn't think of any.
It turns out that this isn't due to an R virtual machine structure. The
reason addTA adds
2009 Nov 02
7
qqplot
Hi,
We could use qqplot to see how two distributions are different from each other. To show better how they are different (departs from the straight line), how is it possible to plot the straight line that goes through them? I am looking for some thing like qqline for qqnorm. I thought of abline but how to determine the slope and intercept?
Best wishes,
Carol
2010 Feb 16
3
margin text warning message NAs coercion
Readers,
I tried to the following commands:
plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D))
mtext(expression(A[1]~B[2]),"additional text",side=3,line=1)
I receive the text that I want, but the command terminal shows the
following response:
Warning message:
NAs introduced by coercion in: mtext(expression(A[1]~B[2]),"additional
text", side = 3,
What is my mistake
2009 Mar 04
3
Sync files not folders non recursively
Hi all,
I am now trying to find a solution to my problem for quite some time. I hope
you can help. What I am trying to do is to simply sync files with a special
suffix to a destination folder. So I dont want to transfer recursively but I
want to delete files from the destination which are not in the source
anymore.
Closest I have gotten is using this command:
/usr/bin/rsync -dnolptgvze --delete
2010 Apr 05
2
find the "next non-NA" value within each row of a data-frame
#I wish to find the "next non-NA" value within each row of a data-frame.
#e.g. I have a data frame mydata. Rows 1, 2 & 3 have soem NA values.
mydata <- data.frame(matrix(seq(20*6), 20, 6))
mydata[1,3:5] <- NA
mydata[2,2:3] <- NA
mydata[2,5] <- NA
mydata[3,6] <- NA
mydata[1:3,]
#this loop accomplishes the task; I am tryign toi learn a "better" way
for(i
2010 Apr 15
2
graphic question
Hello,
I have a simple question that I could not really figure out. I am plotting labels within a graph using the text function. I first plot the first label by specifying the x and y coordinates on the graph. Then to plot the second label next to it, I am using te strwidth function to get the width of the previous label in user coordinate then add the maximum width to the x value. However, this
2010 Sep 25
1
margin control in lattice package
Hi all,
I am difficulty with simple layout of plots in the lattice package
I have created a series of levelplots and would like to plot them to a
single device, but need to reduce the margin areas. This is easily
accomplished with par(oma) and par(mar) in the base graphics package but I
am having problems finding the equivalent features in the lattice package.
Ideally, I would like to reduce
2013 May 30
1
wilcox_test function in coin package
Dear All,
I have two simple data samples (no groups or factors, etc.) and would just
like to compute the two-sample Wilcoxon Rank Sum test using the wilcox_test
function contained in the coin package, which is reportedly better than the
regular wilcox.test function because it performs some adjustment for ties.
Would anyone know how to craft a script to perform this task? Much
appreciated.
Janh