Re: [R] foreign package: unable to read S-Plus objects

2023-01-17 Thread Joseph Voelkel
Thank you for the response, and the reasoning behind. I will try to do as you suggested. Joe From: Uwe Ligges Sent: Tuesday, January 17, 2023 10:04 AM To: Viechtbauer, Wolfgang (NP) ; Kevin Thorpe ; Joseph Voelkel Cc: R Help Mailing List Subject: Re: [R] forei

Re: [R] foreign package: unable to read S-Plus objects

2023-01-17 Thread avi.e.gross
Just an idea if this is a one-time need to copy static data once used in non-R to R. You are a bit vague about what you mean by "objects." If you can find someone who uses S or S+ then maybe they can load the data in and export it in some format usable for you and send you those files. If, for exa

Re: [R] Fwd: Reg: Frequency in declaring time series data

2023-01-17 Thread Eric Berger
Hi Upananda, A few comments: 1. As you know, CRAN has thousands of packages. One of the ways to learn about the packages you might care about is to use the CRAN views. A 'view' is an attempt to provide some information on a certain subset of the packages related to a particular area. See a list of

[R] Reg: lag transformation of time series data

2023-01-17 Thread Upananda Pani
Dear Members, Greetings! I would like to know how to create the lag variable for my data. # Load data and create time series object oil <- read_xlsx("crudefinal.xlsx") pricet=ts(oil$price, start = c(2020, 22), frequency = 365) roilt=ts(diff(log(oil$price))*100,start=c(2020,22),freq=

[R] Fwd: Reg: Frequency in declaring time series data

2023-01-17 Thread Upananda Pani
Hi Rui, Thank you so much for your help. As I have to fit a Markov Switching Model using MSwM package. May I know whether i can convert from zoo object to a time series object. As I have to use several packages which uses ts so I am not able to decide how to do it. Grateful to you for your hel

Re: [R] foreign package: unable to read S-Plus objects

2023-01-17 Thread Uwe Ligges
I just checked the header: read.S from foreign expects: readheader <- function(s) { head <- readBin(s, "int", 8L, 1L) all(head == c(0L, 83L, 32L, 100L, 97L, 116L, 97L, 1L)) } but head is [1] 0 83 32 86 52 45 77 3 i.e. similar but not identical, so a different format is

Re: [R] foreign package: unable to read S-Plus objects

2023-01-17 Thread Jan van der Laan
You could try to see what stattransfer can make of it. They have a free version that imports only part of the data. You could use that to see if stattransfer would help and perhaps discover what format it is in. HTH Jsn On 16-01-2023 23:22, Joseph Voelkel wrote: Dear foreign maintainers and

Re: [R] foreign package: unable to read S-Plus objects

2023-01-17 Thread Viechtbauer, Wolfgang (NP)
@Joe: I have S-Plus 6.0 ("Professional Edition Version 6.0.3 Release 2 for Microsoft Windows : 2001") running here and can't load them there either. Tried simdat and S-Plus apparently thinks it is a script and then you just get a garbled up mess. Tried to change it to simdat.sdd and a few other

Re: [R] foreign package: unable to read S-Plus objects

2023-01-17 Thread Kevin Thorpe
I think you may be right about the cause. From the, “R Data Import/Export” document I find, Function read.S which can read binary objects produced by S-PLUS 3.x, 4.x or 2000 on (32-bit) Unix or Windows (and can read them on a different OS). This is able to read many but not all S objects: in pa

[R] foreign package: unable to read S-Plus objects

2023-01-17 Thread Joseph Voelkel
Dear foreign maintainers and others, I am trying to import a number of S-Plus objects into R. The only way I see how to do this is by using the foreign package. However, when I try to do this I receive an error message. A snippet of code and the error message follows: read.S(file.path(Spath, "