Displaying 9 results from an estimated 9 matches for "shoebodh".
2009 Sep 17
3
Help with date specification
Hi everyone,I have a data daily data (x) for 10 years starting from
04-01-1995 to 03-31-2005.
I was able to get the yearly sum for the ten years using
aggregate(x, years, sum).
But this gave me the yearly sum for 1995 (Apr- Dec); 1996 (Jan-Dec)
---------2005 (Jan-Mar).
But I want to get the aggregates for Apr-1995 to Mar 1996, Apr 1996- mar
1997 and so on.
your help will be higly appreciated.
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 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
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
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
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