Displaying 20 results from an estimated 4000 matches similar to: "Help with date specification"
2009 Sep 09
2
Help with data containing date
Hello Everyone,I think this is a very simple problem, I have been struggling
with it for a few days now.
I have a 10-year daily data in the following format.
Date A B C D E
1978-10-22 18 20.64 0.0 0.176 -1.76
1978-10-23 15 17.06 0.4 0.147 2.52
1978-10-24 3 7.588 0.0 0.068 -6.86
1978-10-25 9 11.491 0.0 0.102
2010 Jun 04
2
Help with iteration using while loop
Hello everyone,
I am trying to use while loop to iterate a function until convergence. But I
am having problem when I try to use a fixed number of iterations.
Say I want to use maximum iteration of 150. If the value don't converge
within maximum iteration, show warning of no convergence.
Currently I don't have non- convergence problem so I think my code works
fine. But in future I may
2009 Dec 07
2
Filtering a zoo object based on index of another object
Hello everybody,
I have two datasets, observed and predicted.
Since my observed dataset is not in regular intervals, I need to filter my
predicted dataset based on the measurement date of my observed data.
Here, is an example similar to what I have
library(chron);library(zoo)
DATE<- seq(as.Date("2009-01-01"), as.Date("2009-05-01"), by = 1)
mydat<- rnorm(length(DATE),
2009 Oct 07
1
Formatting outputs:(chronological object)
Hello everyone,
I have a data generated in a way similar to the following
library(chron);library(zoo)
date<- seq(as.Date("1990-01-01"),, as.Date("2000-12-31"), by = 1)
obs<- zoo(rnorm(length(date), mean = 10, sd = 2.5), order.by = date)
monthly<- function(date) as.Date(as.yearmon(Date))
result<- data.frame ( Date = obs = aggregate(obs, monthly, sum))
Now,
I want
2010 Jun 14
1
avoid row/column indexing in capture.output
Hi everyone,
This might be a very petty thing but Its not working for me.
I want to export an output to a txt file but without indexing.
Here is what I have tried to do
outfile<- function(Time, var.names, output) {
var.names = c(names(para))
for(i in 1: ncol(output)){
cat(length(var.names), '\n')
cat("A", "S", "C", "I", '\n')
2009 Oct 27
1
option to control the spac between columns in data frame
Hello,
I have a question regarding a way to control the appreance of output
exported by R
when I use capture.output( x, file = "Directory/file.txt") , I get a text
file which when I paste to a word file looks like the first table below.
The following table has its clumns spaced closely so when I paste it to a
word file it looks continuous. Is there any option in R to make the outputs
2010 Apr 26
1
finite difference scheme for 2D differential equations
Hello everyone,
I am trying to solve 2D differential equations using finite difference
scheme in R. I have been able to work with the equations with only one
spatial dimensions but I want to extend it to the two dimensional problem.
For example i can simulate one dimensional diffusion using a code like the
following. But I want to write a similar code for,say, a two dimensional
diffusion
2006 Feb 17
3
(Newbie) Functions on vectors
Folks,
I want to make the following function more efficient, by vectorizing it:
getCriterionDecisionDate <- function (quarter , year)
{
if (length(quarter) != length(year)) stop ("Quarter and year vectors
of unequal length!");
ret <- character(0);
for (i in 1:length(quarter)) {
currQuarter <- quarter[i];
currYear <- year[i];
if ((currQuarter < 1) |
2009 Sep 08
1
Help with use of rep function in R
Dear List,I am trying to use rep function in the following conditions
A = c( 5, 6, 7, 11, 9, 12, 10, 15)
B = c(12,15, 21, 31, 25, 27,32, *34*,13,12, 34, 33, 24, 29, 26,
*28*,22,14,27,22,21,12,32,
16)
I need to repeat each element of A, as many times as each element of B, for
the entire length of B.
for example,
repeat 5, for 12 times, 6 for 15 times,........, 15 for 34 times, and then,
again, 5
2008 Sep 11
2
Handling time-series-Data
Dear List,
I ran into some problems with time-series-Data.
Imagine a data-structure where observations (x) of test attendants (i) are made a four times (q) a year (y). The data is orderd the following way:
I y q x
1 2006 1 1
1 2006 3 1
1 2006 4 1
1 2007 1 1
1 2007 2 1
1 2007 3 1
1 2007 4 1
2 2006 1 1
3 2007 1 1
3 2007 2 1
I am looking for a way to count the attendants that at least have
2011 Apr 09
5
Yearly aggregates and matrices
Hi,
I need to perform calculations on subsets of a data frame:
DF = data.frame(read.table(textConnection(" A B C D E F
1 a 1995 0 4 1
2 a 1997 1 1 3
3 b 1995 3 7 0
4 b 1996 1 2 3
5 b 1997 1 2 3
6 b 1998 6 0 0
7 b 1999 3 7 0
8 c 1997 1 2 3
9 c 1998 1 2 3
10 c 1999 6 0 0
11 d 1999 3 7 0
12 e 1995 1 2 3
13 e 1998 1 2 3
14 e 1999 6
2011 Jul 23
1
Extend my code to run several data at once.
Hi
I have a code that calculate maximisation using optimx and it is working
just fine. I want to extend the code to run several colomns of R_j where j
runs from 1 to 200. If I am to run the code in its current state, it means I
will have to run it 200 times manually. May you help me adjust it to
accomodate several rows of R_j and print the 200 results.
***Please do not get intimidated by the
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 =
2012 Feb 06
3
Duplicate rows when I combine two data.frames with merge!
Hello all,
First I have done extensive searches on this forum and others and nothing
seems to work. So I decided to post thinking someone could point me to the
write post or give me some help.
I have drawn a 100 samples from a fictitious population (N=1000), and then
randomly selected 25% of the 100 samples. I would like to now merge the
data.frame from the 100 samples with the data.frame for
2010 Jan 30
2
question about time series objects
Hi All,
I have a very simple question about a time series object: how to access
values for a particular year and quarter (say)?
Suppose, following
http://www.stat.pitt.edu/stoffer/tsa2/R_time_series_quick_fix.htm
I have read in data as a time series; here is how it looks.
* Qtr1 Qtr2 Qtr3 Qtr4
1960 0.71 0.63 0.85 0.44
1961 0.61 0.69 0.92 0.55
. . . . .
2012 Apr 18
2
quarter end dates between two date strings
Hello,
I have two date strings, say "1972-06-30" and "2012-01-31", and I'd like to
get every quarter period end date between those dates? Does anyone know how
to do this? Speed is important...
Here is a small sample:
Two dates:
"2007-01-31"
"2012-01-31"
And I'd like to get this:
[1] "2007-03-31" "2007-06-30"
2009 Sep 13
3
How to get last day of a month?
Is there any R function to calculate automatically the last day of a
particular month? For example "sep2009" should be converted to last day of
September of 2009?
Thanks
--
View this message in context: http://www.nabble.com/How-to-get-last-day-of-a-month--tp25425645p25425645.html
Sent from the R help mailing list archive at Nabble.com.
2018 Jan 28
2
Plotting quarterly time series
I have a data set with quarterly time series for several variables. The
time index is recorded in column 1 of the dataframe as a character vector
"Q1 1961", "Q2 1961","Q3 1961", "Q4 1961", "Q1 1962", etc. I want to
produce line plots with ggplot2, but it seems I need to convert the time
index from character to date class. Is that right? If so, how
2023 Jul 21
1
Adding SRV records to zone
Hi Sagar,
Are you getting a particular error?
Because the same method should work just fine in NSD. Simply open the
corresponding zone file (as configured in nsd.conf) and put that line
in there.
Best regards,
Jeroen Koekkoek
On Fri, 2023-07-21 at 09:14 +0200, Sagar Acharya via nsd-users wrote:
> How do I add SRV record to my zone file?
>
> Eg. In pdns I have
>
>
2008 May 31
1
Representing 'Date' as 'Year - Quarter'
I have financial data on a a set of firms, with a quarterly period
(fundamental data). The data spans 10 years, and four quarters per
year. The present file (.csv) reads the Date columns as "200706" for
the second quarter of 2007; "199809" for the third quarter of 1997.
Is there a way I can convert it to something like "2007 Q2", "1998 Q3"?
I am aware of