Displaying 20 results from an estimated 1200 matches similar to: "Constructing dummy variables for months for a time series object"
2009 Aug 20
4
expanding 1:12 months to Jan:Dec
Dear R users
I would like to do some spreadsheet style expansion of dates. For
example, I would need to obtain a vector of months. I approached in an
obviously wrong way:
> paste(01:12)
[1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12"
> as.Date(paste(01:12),
2011 Feb 22
2
Calculate a mean for several months for several years
Hello everyone,
I have a dataset with 3 colums (Year, Month, MeanTemp). Now I would like to
calculate the average of the mean temperature for the summer months (Juli,
August, September) for each of the 20 years.
I'm sure it's somehow possible with a loop, but all I tried so far didn't
worked and by the time I spent looking for a solution I would have even be
faster doing this in
2018 Apr 16
3
strange warning: data() error?
A user asked me about this and I can't figure it out.
tmt% R
R Under development (unstable) (2018-04-09 r74565) -- "Unsuffered Consequences"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
> library(survival)
> data(cgd0)
Warning message:
In data(cgd0) : data set ?cgd0? not found
----
The data set is present and can be
2010 Aug 27
3
Sorting groups in bwplot chart
Hi all,
I am just curious how to sort the groups in a categorical box plot chart
bwplot
here is the example:
d<-data.frame(sample(rep(month.abb,20), 100), runif(100,1,10));
colnames(d) <- c("Month", "Value");
bwplot(d$Month ~ d$Value);
as you can see Months are not sorted alphabetically. Does anybody know ho to
sort those on the chart level?
Thank you
Jan
2010 Aug 04
6
applying strsplit to a whole column
I am sorry, I'd like to split my column ("names") such that all the
beginning of a string ("X..") is gone and only the rest of the text is
left.
x<-data.frame(names=c("X..aba","X..abb","X..abc","X..abd"))
x$names<-as.character(x$names)
(x)
str(x)
Can't figure out how to apply strsplit in this situation - without
using a
2003 Feb 13
2
legend
I think I'm missing something tonight in the usage of 'legend':
plot(0, type="n")
legend(locator(1), month.abb[1:5], pch=15, col=1:5)
gives me something similar to what I want. But
legend(locator(1), month.abb[1:5], fill=T, col=1:5)
gives me 5 black boxes.
What am I doing wrong?
Thank you,
> version
_
platform i686-pc-linux-gnu
arch i686
os
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]]
2005 Sep 07
2
Month recognition issue
Dear all,
I am running
R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0
Under Mac os X, a french version!
I am preparing a package and I got the following issue
I am trying to read dates that are written in
english and have them recognized by R using
as.Date function.
I realized strangely that when I type
> month.abb
[1]
2004 Feb 11
4
ext3 Overhead
Hello!
I'm using a CompactFlash as storage device. Since those CF cards only have
limited write cycles (CF does wear-levelling by itself, but you don't want
to write too many timet so the card) i was wondering by what a factor the
journaling of ext3 increases the write accesses to the CompactFlash
compared to ext2. Thanks a lot already for your help!
Sincerely
Chris Braun
2010 May 12
2
sorting rows of dataframe
Hello:
I have a dataframe, where the first column in a month:
Month CATCHMENT_ med min max
1 Apr Alknda01 71.68080 11.9406600 196.2753
2 Apr Alknda02 69.44580 12.1065600 196.2753
3 Apr ArialKhan 39.89310 5.8598700 175.4433
4 Apr Arjun01 4.79652 0.0093336 55.7136
5 Apr Arjun02 4.79652 0.0093336 55.7136
6 Apr Arun01 52.42320 0.1571928
2010 Sep 08
2
Drop single-dimensional array
Hi Simon, thank you for the concise reply.
Do you mean the reported behavior of drop() is not a bug?
It looks like a borderline bug to me (see below), but I'm not the judge of
that. If this is the intended behavior and serves an actual purpose, then
that could be explicitly documented in a \note{} on the help page.
Such a note would slightly reduce the surprise of users running into this
2009 Jul 09
1
merge performace degradation in 2.9.1
I have noticed a significant performance degradation using merge in 2.9.1
relative to 2.8.1. Here is what I observed:
N <- 100000
X <- data.frame(group=rep(12:1, each=N), mon=rep(rev(month.abb), each=N))
X$mon <- as.character(X$mon)
Y <- data.frame(mon=month.abb, letter=letters[1:12])
Y$mon <- as.character(Y$mon)
Z <- cbind(Y, group=1:12)
system.time(Out
2013 Sep 30
4
[LLVMdev] RTSC - Real-Time Systems Compiler
Hello John,
Thank you very much for your fast response and the patch.
Is it possible to add Fabian Scheler and Florian Franzmann to the people
section as proposed in the attached patch?
I hope to manage to write a description for the 'ProjectsWithLLVM' page
this week and send it to the list.
Thanks again,
Tobias
Am 26.09.2013 21:26, schrieb John Criswell:
> Dear Tobias,
>
>
2005 Sep 07
1
Language issue
Dear all,
I am running
R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0
Under Mac os X, a french version!
I am preparing a package and I got the following issue
I am trying to read dates that are written in
english and have them recognized by R using
as.Date function.
I realized strangely that when I type
> month.abb
[1]
2008 Sep 12
1
how to plot monthly mean data showing missing months
Dear R users,
As per my attached script I am ploting monthly mean data which has missing
months.
But in the plot missing months are not shown (plot attached).
Kindly help how to show complete plot (Jan-Dec) with missing months.
Regards,
Yogesh
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: script.txt
URL:
2008 Nov 28
7
Examples of advanced data visualization
Dear R-help,
I am looking for ideas and presentations of new and advanced data visualization
methods. As an example of what I am searching for, the 'Many Eyes' pages at
http://manyeyes.alphaworks.ibm.com/manyeyes/
may provide a good paradigm. I would be interested even if it will not be easy
to implement such examples in R, e.g. because of the interactive nature of these
graphical
2008 Jul 08
4
Histogram with colors according to factor
Given a data frame with a continuous variable and a factor. I would like to
generate a histogram of the continuous variable, where each bar is filled
with different colors according to the percentage of factor values falling
into this region of the continuous variable.
I looked into packages like 'lattice' and 'ggplot2'. Searching R-help
revealed that 'histogram' is
2013 Oct 10
0
[LLVMdev] RTSC - Real-Time Systems Compiler
Hey,
As announced earlier, here comes our project description.
It would be great if you could add it to llvm.org!
Tobias
--
The Real-Time Systems Compiler (RTSC)
The Real-Time Systems Compiler (RTSC) is an operating-system–aware
compiler that allows for a generic manipulation of the real-time system
architecture of a given real-time application.
Currently its most interesting application is
2013 Jan 03
3
Make a column from columns
Hi,
I have a data matrix with 13 columns and 55 rows. First coulmn is year and
other are monthly values for 55 years.
Now i want to create a single column of all the values ( i e a single time
series column from column 2 to 13 ).
Is it the for loop that works here ...how ?
or how i can rearrange the data so that it becomes a times series column.
hope i made the question clear .
thank you,
2007 Jan 20
4
simple q: returning a logical vector of substring matches
I'm a relative R novice, and sometimes the simple things trip me up.
Suppose I have
a <- c("apple", "pear")
and I want a logical vector of whether each of these strings contains
"ear" (in this case, F T). What is the idiom?
Quizzically,
Mark Lindeman