Re: [R] Could not read time series data using read.zoo()

2023-08-03 Thread Christofer Bogaso
Hi, I just provided a snapshot of my CSV file. Attaching the full file here (not sure if R-help would accept the attachment). Thanks and regards, On Thu, Aug 3, 2023 at 8:35 PM Jeff Newmiller wrote: > > no commas? > > On August 3, 2023 7:53:07 AM PDT, Christofer Bogaso > wrote: > >Hi, > > >

Re: [R] Could not read time series data using read.zoo()

2023-08-03 Thread Gabor Grothendieck
The header has white space in it so skip over it, use header = FALSE and specify the column headers yourself. Also use fill=TRUE since the first row does not have 3 entries. # generate test file cat("Date Adj Close lret 02-01-1997 737.01 03-01-1997 748.03 1.48416235 06-01-1997 747.65

Re: [R] Could not read time series data using read.zoo()

2023-08-03 Thread John Kane
One reason seems to be you are saying sep = "," and there is no "," in the file. Also you only have 3 columns of data but 4 variable names. On Thu, 3 Aug 2023 at 10:53, Christofer Bogaso wrote: > Hi, > > I have a CSV which contains data like below (only first few rows), > > Date Adj Close lret

Re: [R] Could not read time series data using read.zoo()

2023-08-03 Thread Stephen H. Dawson, DSL via R-help
Agreed. Tab character is not comma character. *Stephen Dawson, DSL* /Executive Strategy Consultant/ Business & Technology +1 (865) 804-3454 http://www.shdawson.com On 8/3/23 11:04, Jeff Newmiller wrote: no commas? On August 3, 2023 7:53:07 AM PDT, Christofer Bogaso wrote: Hi, I have a

Re: [R] Could not read time series data using read.zoo()

2023-08-03 Thread Jeff Newmiller
no commas? On August 3, 2023 7:53:07 AM PDT, Christofer Bogaso wrote: >Hi, > >I have a CSV which contains data like below (only first few rows), > >Date Adj Close lret >02-01-1997 737.01 >03-01-1997 748.03 1.48416235 >06-01-1997 747.65 -0.050813009 >07-01-1997 753.23 0.743567202 >08-01-1997