Insheet a Specific Variable in Delimited Data in Stata -
i have data in .txt in variables delimited symbol | , first row contains variable names. have insheeted data as:
insheet using "filename.txt", delim("|") clear
however, insheet 1 variable data set. when try insheet 1 variable in, have tried:
insheet variable using "filename.txt", delim("|") clear
unfortunately, not work, , using reduced down version of .txt, receive error:
too few variables specified error in line 2 of file
the .txt looks follows:
v1|v2 123|456
note there more variables , more rows i've reduced ease of exposition. in addition, .txt formatted automatic return after each row.
i appreciate can provide task. please let me know whether there further information can provide make issue clearer.
it's difficult me why doesn't work, insheet
old code seems little more fragile other import commands.
did try import excel
?
is out of question insheet
, drop
don't want?
did think of using filefilter
change |
spaces or commas?
Comments
Post a Comment