I need to save into a scalar object the result of 52.32/10.01
I tried with
read(t=dat) input.txt 2
but that creates two series objects named as the data got from the file :s
The format of the input file is like the one attached. That is the only thing I need to do with the file.
Once used (saving the result in the scalar object) I need to delete the file. Is that also possible?
Thanks in advance
Work with data from a txt file
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Work with data from a txt file
- Attachments
-
- input.txt
- (42 Bytes) Downloaded 663 times
-
EViews Esther
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: Work with data from a txt file
I am very confused about your question. Are you trying to read your data from your ASCII file and create a new series which contains specific scalar values?
will read data from an ASCII file *input.txt* in the default directory and show you 2 series, which are named to be SERIES01 and SERIES02.
will create a new series (names NEW) which contains the value of 52.32/10.01.
will delete the series *SERIES01* and *SERIES02*, however, leave the new series *NEW*.
Code: Select all
read(t=dat) input.txt 2Code: Select all
series new = series01/series02Code: Select all
delete series01 series02 -
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Work with data from a txt file
Something like
should work. You can then use the shell command to get access to the operating system so you can delete the file.
Code: Select all
matrix(2,2) a
a.read(t=dat) input.txt
scalar val = a(1,1) / a(1,2)
Re: Work with data from a txt file
thanks a lot.
I will do some trials with the shell command to see if I can delete the file
I will do some trials with the shell command to see if I can delete the file
Re: Work with data from a txt file
just in case anyone has this problem in the future
Code: Select all
shell del C:\Users\...\input.txtWho is online
Users browsing this forum: No registered users and 1 guest
