Displaying 20 results from an estimated 1100 matches similar to: "two y-axis in xy-plot"
2006 Jan 16
1
label of second y-axis in xyplot (lattice)
Dear group,
First I provide you with an example, I found in the newsgroup. Then I'd like to explain my problem to you by means of the output.
enviro <-
data.frame(Year = rep(2001:2002, each = 365),
Day = rep(1:365, 2),
Precip = pmax(0, rnorm(365 * 2)),
Temp = 2 + 0.2 * rnorm(365 * 2))
xyplot(Precip + Temp ~ Day | Year,
2005 Dec 22
1
panel order in xyplot
Hi all,
I have a question concerning xyplot. My data is a data.frame looking like that:
In the first column I have numbers from 0 to 23 (hours of a day), the second column contains the name of a weekday (Day as factor) and the third column contains the number I am interested in. So as an example, the first five rows look like that:
Hour Day Freq
1 0 Mo 23
2 1 Mo
2005 Nov 21
3
Comparing rows of matrices with different dimensions
Hi there,
I have a question, which I thought is very easy to solve, but somehow I can't find a solution. Probably someone could help me quickly?
Here it is:
I have two matrices:
a
[,1] [,2] [,3]
[1,] 1 4 9
[2,] 2 6 10
[3,] 3 6 11
[4,] 4 8 12
b
[,1] [,2]
[1,] 1 4
[2,] 2 5
[3,] 3 6
Now I want to find
2008 Dec 09
1
Voicemail.conf : concise hour prompts
Hi,
In voicemail.conf:
; Supported values:
; 'filename' filename of a soundfile (single ticks around the filename
; required)
; ${VAR} variable substitution
; A or a Day of week (Saturday, Sunday, ...)
; B or b or h Month name (January, February, ...)
; d or e numeric day of month (first, second, ..., thirty-first)
; Y Year
; I or l
2005 Mar 24
1
Histogram over times (without dates)
Dear Group,
Having a character vector like this one:
[1] "03:38:55" "07:42:38" "08:04:27" "08:17:13" "08:41:14" "08:46:58"
[7] "08:47:11" "08:53:51" "08:57:51" "08:58:56"
I try to do a histogram over times of a day. All I want to know, if my solution is proper or if there is another
2006 May 02
2
Time series plot
I have some time series data like
01/02/1990 0.531 0.479
01/03/1990 0.510 0.522
01/06/1990 0.602 0.604
there is no weekends and holidays.
how do I graph them in a single plot that the x-axis is the dates and
the y-axis is the time series?
Thank you
Regards,
Jincai Jiang
(Office) 212-761-3984
--------------------------------------------------------
This is not an offer (or solicitation
2008 Apr 23
3
select rows from data based on a vector of char strings
Hi,
I have loaded a dataset in R :
data =
label freq1 freq2
news 54 35
fun 37 21
milk 19 7
food 3 3
.... etc
And I have a vector
flist<-c("fun","food")
Now I want to use the vector 'flist' for selecting these values from 'data'
so that I get the following dataset :
label freq1 freq2
fun 37 21
food
2010 Mar 19
1
How to plot two cumulative frequency graph together
Dear masters,
I have data that looks like this:
#val Freq1 Freq2
0.000 178 202
0.001 4611 5300
0.002 99 112
0.003 26 30
0.004 17 20
0.005 15 20
0.006 11 14
0.007 11 13
0.008 13 13
...many more lines..
Full data can be found here:
http://dpaste.com/173536/plain/
What I intend to do is to have a cumulative graph
with "val" as x-axis with "Freq1" & "Freq2" as
2005 Jun 06
3
Reading huge chunks of data from MySQL into Windows R
Dear List,
I'm trying to use R under Windows on a huge database in MySQL via ODBC
(technical reasons for this...). Now I want to read tables with some
160.000.000 entries into R. I would be lucky if anyone out there has
some good hints what to consider concerning memory management. I'm not
sure about the best methods reading such huge files into R. for the
moment I spilt the whole
2003 Jun 25
1
indication tones and callwaiting chirp too loud
I am wondering if anyone could help me figure out how to turn down the volume on all the dial tones, indications, etc.. and especially the call-waiting CHIRP!
I don't want to change the txgain and rxgain because they are working at levels that I would like. However, when voice conversations and voicemail recordings are at good levels then the dial tones, busy tones, etc are way too loud.
2012 Nov 30
4
Nightingale’s Rose chart-any suggestion?
Hello, Everyone.
Does anyone know how to create a Nightingale’s Rose chart by using R?
Hopefully, the graph could be displayed like this:
http://mbostock.github.com/protovis/ex/crimea-rose.html
Thanks a lot.
Kind regards,
Henry
[[alternative HTML version deleted]]
2008 Dec 16
6
Find all numbers in a certain interval
Hi all,
I'd like to know, if I can solve this with a shorter command:
a <- rnorm(100)
which(a > -0.5 & a < 0.5)
# would give me all indices of numbers greater than -0.5 and smaller than +0.5
I have something similar with a dataframe and it produces sometimes quite long
commands...
I'd like to have something like:
which(within.interval(a, -0.5, 0.5))
Is there anything I
2011 Feb 11
2
fitdistr question
Hello,
I tried to fit a poisson distribution but looking at the function
fitdistr() it does not optimize lambda but simply estimates the mean
of the data and returns it as lambda. I'm a bit confused because I was
expecting an optimization of this parameter to gain a good fit...
If I would use mle() of stats4 package or mle2() of bbmle package, I
would have to write the function by myself
2011 Feb 04
2
terribly annoying bug with POSIXlt : one o'clock is midnight?
Apparently, as.POSIXlt takes one o'clock as the start of the day :
> as.POSIXlt(0,origin="1970-01-01")
[1] "1970-01-01 01:00:00 CET"
> as.POSIXlt(0,origin="1970-01-01 00:00:00")
[1] "1970-01-01 01:00:00 CET"
> as.POSIXlt(0,origin="1970-01-01 23:59:59")
[1] "1970-01-02 00:59:59 CET"
Cheers
--
Joris Meys
Statistical
2006 Nov 01
4
extract values from a vector
Hello,
I'm looking for a solution for the following problem:
I have two vectors
V1 <- c("apple","honey","milk","bread","butter")
V2 <- c("bread","milk")
now, I would like to know for each element in V1 if it's equal to one of
the elements in V2
I could do:
which(V1 == V2[1] | V1 == V2[2])
but what if I
2009 Jan 20
5
from matrix to data.frame
Hello,
I have a question how to reshape a given matrix to a data frame.
# ----------------------------------
> a <- matrix(1:25, nrow=5)
> a
[,1] [,2] [,3] [,4] [,5]
[1,] 1 6 11 16 21
[2,] 2 7 12 17 22
[3,] 3 8 13 18 23
[4,] 4 9 14 19 24
[5,] 5 10 15 20 25
> colnames(a) <- LETTERS[1:5]
> rownames(a) <-
2009 Sep 28
2
Levelplot without margins
Hello,
I'm not very experienced with lattice and I was wondering whether I get
get some hints from you how to create a pure heatmap (using levelplot),
without any axis, title, legend, margin at all... I just want to see the
coloured squares, nothing else.
Any suggestions?
Antje
2008 Dec 05
6
levels update
Hello,
I hope this question is not too stupid. I would like to know how to update
levels after subsetting data from a data.frame.
df <- data.frame(factor(c("a","a","c","b","b")), c(4,5,6,7,8), c(9,1,2,3,4))
names(df) <- c("X1","X2","X3")
my.sub <- subset(df, X1 == "a" | X1 == "b")
2009 May 05
3
Heatmap without levelplot
Hi there,
as I'm not sure to understand the coloring levelplot uses, I'm looking for
another easy way to create a heatmap like this:
library(lattice)
mat <- matrix(seq(1,5, length.out = 12), nrow = 3)
mat[1,2] <- 3.5
my.at <- seq(0.5,5.5, length.out = 6)
my.col.regions <- rainbow(5)
graph <- levelplot(t(mat[nrow(mat):1, ] ), at = my.at, col.regions =
my.col.regions)
2008 May 23
2
Boxplot width
Hi there,
assume that you have data with different sampling like
d1 <- rnorm(100)
d2 <- rnorm(150)
now, I'd like to create two boxplots in one graph but each plot located at the
sampling number at the x-axis. This, I can do with "at"
l <- list(d1,d2)
boxplot(l, at=c(length(d1), length(d2)), xlim=c(0,200) )
but both plots are very thin and I'd like to increase the