[R] avoid row/column indexing in capture.output

2010-06-14 Thread Subodh Acharya
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)

Re: [R] Help with iteration using while loop

2010-06-04 Thread Subodh Acharya
> Hi Subodh, > > Minor note: please keep replies on list so everyone benefits from > answers/questions. > > Now: > > > On Fri, Jun 4, 2010 at 2:49 PM, Subodh Acharya wrote: > > Thanks a lot Steve, > > It worked. I appreciate. But I have another question, may b

[R] Help with iteration using while loop

2010-06-04 Thread Subodh Acharya
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. Currentl

[R] finite difference scheme for 2D differential equations

2010-04-25 Thread Subodh Acharya
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 co

[R] Filtering a zoo object based on index of another object

2009-12-07 Thread Subodh Acharya
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

[R] option to control the spac between columns in data frame

2009-10-27 Thread Subodh Acharya
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

[R] Formatting outputs:(chronological object)

2009-10-07 Thread Subodh Acharya
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<-

[R] Help with date specification

2009-09-17 Thread Subodh Acharya
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 aggrega

[R] Help with data containing date

2009-09-08 Thread Subodh Acharya
convert the data into a time series object but was not able to even change it into the time series object. Any help would be highly appreciated Thank you in advance. -- Subodh Acharya University of Florida Gainesville, FL. [[alternative HTML version deleted

[R] Help with use of rep function in R

2009-09-07 Thread Subodh Acharya
of A and B was equal. Thank you for your help in advance. -- Subodh Acharya University of Florida Gainesville, FL. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

[R] Help with use of rep function in R

2009-09-07 Thread Subodh Acharya
of A and B was equal. Thank you for your help in advance. -- Subodh Acharya University of Florida Gainesville, FL. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do