Convert Series type to svector

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

lgazire
Posts: 14
Joined: Mon Feb 11, 2019 8:56 am

Convert Series type to svector

Postby lgazire » Tue Feb 12, 2019 10:16 am

Getting the result table from a sql query returns two data types, a series and a alpha, i can easily convert the alpha to svector using the @convert, is there a way to do the same with the series type? Currently using Eviews 10.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 12170
Joined: Tue Sep 16, 2008 5:38 pm

Re: Convert Series type to svector

Postby EViews Gareth » Tue Feb 12, 2019 12:34 pm

You want to convert a series to a string-vector? If so, use @str to convert the series into an alpha, then @convert to convert that alpha into an svector.

If you want to convert the series into a vector, just use @convert on the series.
Follow us on Twitter @IHSEViews

lgazire
Posts: 14
Joined: Mon Feb 11, 2019 8:56 am

Re: Convert Series type to svector

Postby lgazire » Tue Feb 12, 2019 1:03 pm

Awesome! It worked great!
Just one more question i need to get the series date time values into a date time array, how can it be done?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 12170
Joined: Tue Sep 16, 2008 5:38 pm

Re: Convert Series type to svector

Postby EViews Gareth » Tue Feb 12, 2019 1:58 pm

Probably the easiest thing to do is to use @strdate(@date, "YYYY/MM/DD") to create a string representation of the dates as an alpha, then bring that alpha over.
Follow us on Twitter @IHSEViews


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest