Displaying 20 results from an estimated 8000 matches similar to: "xyplot: superpose 2 time series with different time intervals"
2009 Jul 31
1
superpose 2 time series with different time intervals
I could use some advice.
I've got 2 time series. Both cover approximately the same period of
time (ie, 1940 to 2009). But one series has annual data and the other
has monthly data. One refers to university enrollment; the other to
unemployment rates. Both are currently in the same data frame.
I'd like to use the monthly times series as a light grayscale
background for a plot of the
2011 Jul 28
2
Ploting gradient
I have a simple bar chart with annual precipitation (jan to dez).
I want to plot, above each bar (on a line), a square wich is color based on
a scale (0-100%). With 0 being white and 100 black, like a gradient. Is it
possible? How to?
Thanks
--
Fernando Andreacci
[[alternative HTML version deleted]]
2006 May 12
1
superpose two variables in lattice/xyplot
Dear R users,
I try to use xyplot() to display two different response variables from
the same dataframe per panel, but don't succeed:
xyplot(ptot.seaslog ~ vmcwit | seas, data=reeks, as.table=TRUE,
panel = function(x,y){
panel.xyplot(x, y, ylim=c(0,1))
panel.superpose(x=reeks$vmcwit, y=reeks$ptotbin,
panel.groups = "panel.xyplot",
2003 Jan 10
1
Superposed histograms
I woud like to plot cumulative histograms. Specifically,
I have data like
Sex M M F M F F M F
Height 6 6.3 6.1 5.5 7.2 6.2 5.9 6.0 ....
and I want to plot a histogram of the distribution of all heights,
colouring the histogram bars according to sex, for example
| o
| oo o
| o oo ** o o = observations of women
| o o*o***o * = observations of
2004 Sep 22
5
block statistics with POSIX classes
I have a monthly price index series x, the related return series y = diff(log(x)) and a POSIXlt date-time variable dp. I would like to apply annual blocks to compute for example annual block maxima and mean of y.
When studying the POSIX classes, in the first stage of the learning curve, I computed the maximum drawdown of x:
> mdd <- maxdrawdown(x)
> max.dd <- mdd$maxdrawdown
> from
2012 Nov 09
2
Creating yyyymm regexp strings on the fly for aggregation.
Folks,
This question is somewhat related to a previous posting of mine.
I just can't seem to create a generic solution.
Here is a function that I found searching around the internet:
splitIt <- function(x, n) {split(x, sort(rank(x) %% n))}
I use it like so:
> splitIt(1:12, 2)
$`0`
[1] 1 2 3 4 5 6
$`1`
[1] 7 8 9 10 11 12
Or
> splitIt(1:12, 4)
$`0`
[1] 1 2 3
$`1`
[1] 4 5 6
2017 Oct 06
2
Time series: xts/zoo object at annual (yearly) frequency
Hi,
I'd like to make a time series at an annual frequency.
> a<-xts(x=c(2,4,5), order.by=c("1991","1992","1993"))
Error in xts(x = c(2, 4, 5), order.by = c("1991", "1992", "1993")) :
order.by requires an appropriate time-based object
> a<-xts(x=c(2,4,5), order.by=1991:1993)
Error in xts(x = c(2, 4, 5), order.by =
2017 Nov 21
2
Do I need to transform backtest returns before using pbo (probability of backtest overfitting) package functions?
[re-sending - previous email went out by accident before complete]
Hi Joe,
The centering and re-scaling is done for the purposes of his example, and
also to be consistent with his definition of the sharpe function.
In particular, note that the sharpe function has the rf (riskfree)
parameter with a default value of .03/252 i.e. an ANNUAL 3% rate converted
to a DAILY rate, expressed in decimal.
That
2007 Jul 14
3
How to read many files at one time?
I want to load many files in the R. The names of the files are "Sim1.txt", "
Sim2.txt", "Sim3.txt", "Sim4.txt", "Sim5.txt" and so on.
Can I read them at one time? What should I do? I can give the same names in
R.
Thanks.
For example:
> tst=paste("Sim",1:20,".txt",sep="") # the file names
> tst
[1]
2009 Mar 31
3
labeling panels in lattice plots
I am using windows XP with R 2.8.1
I am generating a lattice plot of annual rain patterns using the following
function:
> xyplot(rain.stats$min+ rain.stats$max + rain.stats$ave ~
rain.stats$month |rain.stats$year,
lty = 1, data = rain.stats, type = c("l","l", "l"), col =
c("red", "blue", "green"), distribute.type =
2008 Jul 29
2
About clustering techniques
Hello R users
It's some time I am playing with a dataset to do some cluster analysis. The
data set consists of 14 columns being geographical coordinates and monthly
temperatures in annual files
latitutde - longitude - temperature 1 -..... - temperature 12
I have some missing values in some cases, maybe there are 8 monthly valid
values at some points with four non valid. I don't want to
2010 Dec 26
4
how to replace my double for loop which is little efficient!
Dear all,
My double for loop as follows, but it is little efficient, I hope all
friends can give me a "vectorized" program to replace my code. thanks
x: is a matrix 202*263, that is 202 samples, and 263 independent variables
num.compd<-nrow(x); # number of compounds
diss.all<-0
for( i in 1:num.compd)
for (j in 1:num.compd)
if (i!=j) {
S1<-sum(x[i,]*x[j,])
2017 Nov 21
0
Do I need to transform backtest returns before using pbo (probability of backtest overfitting) package functions?
Hi Eric,
Thank you, that helps a lot. If I'm understanding correctly, if I?m wanting
to use actual returns from backtests rather than simulated returns, I would
need to make sure my risk-adjusted return measure, sharpe ratio in this
case, matches up in scale with my returns (i.e. daily returns with daily
sharpe, monthly with monthly, etc). And I wouldn?t need to transform
returns like the
2005 Sep 01
1
Strange build message: request help w/resolving
Greetings,
I am attempting to build a R package, however the build fails and the
following message is ouput:
C:\ConstellaGroup\EPA\RAGG\package>R CMD BUILD --binary --force RAGG
* checking for file 'RAGG/DESCRIPTION' ... OK
* preparing 'RAGG':
* checking DESCRIPTION meta-information ... ERROR
Error in if (regexpr(dep_regexp, dep) == -1) { :
missing value where
2005 Jul 17
1
Strange problems with lattice plots
Dear r-help,
I need to draw some lattice plots and have stuck in strange problems.
I have a data frame of 405 rows:
> str(dframe)
`data.frame': 405 obs. of 4 variables:
$ year : num 1990 1990 1990 1990 1990 1990 1990 1990 1990 1990 ...
$ month: num 1 2 3 4 5 6 7 8 9 10 ...
$ V_A2 : num NA NA NA NA NA ...
$ V_A3 : num NA NA NA NA NA ...
Variable month changes from 1 to 27
2017 Nov 21
1
Do I need to transform backtest returns before using pbo (probability of backtest overfitting) package functions?
Correct
Sent from my iPhone
> On 21 Nov 2017, at 22:42, Joe O <joerodonnell at gmail.com> wrote:
>
> Hi Eric,
>
> Thank you, that helps a lot. If I'm understanding correctly, if I?m wanting to use actual returns from backtests rather than simulated returns, I would need to make sure my risk-adjusted return measure, sharpe ratio in this case, matches up in scale with
2011 Oct 10
3
Superposing mean line to xyplot
Dear R-users,
I'm using lattice package and function xyplot for the first time so
you will excuse me for my inexperience. I'm facing quite a simple
problem but I'm having troubles on how to solve it, I've read tons of
old mails in the archives and looked at some slides from?Deepayan
Sarkar but still can not get the point.
This is the context. I've got data on 9 microRNAs, each
2009 May 08
2
display data ( text) on leveplot / Superpose panel
I am trying to display data ion top of colored rectangle on the same levelplot. While using superpose the shape and symbol for levelplot changes to small circle. I am unable to figure what exactly I am doing wrong... It may be straightforward solution... .I will appreciate help to fix this issue.
2012 Feb 14
1
cumsum function to determine plankton phenology
Apologies for the empty email earlier!
I have species abundance data sampled at a weekly frequency or
sometimes monthly depending on the year.
The goal is to identify the dates in an annual cycle in which the
cumulative abundance of a species reaches some threshold.
Here's an example of the data for 1 species over an annual period:
"mc_pheno" is the object created from this data:
2010 Apr 24
2
barplot - offsetting individual bars
Hello,
I'm trying currently using barplot to summarize precipitation data. So far
I've compiled total annual snow and rain accumulation in a table
(attached). I've been successful at plotting it using the following code:
fig=barplot(t(Annual_Precip_table), horiz=TRUE, space=0, col=c("grey70",
"white"), axes=FALSE)
.
.
The result is a stacked barplot with total