Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: long invalid varname error on insheet


From   "Victor C. Van Hee" <vvanhee@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: long invalid varname error on insheet
Date   Thu, 25 Jun 2009 18:05:59 -0700

I figured this out -- apparently, you can't name a variable "long". Stata was trying to tell me what was wrong, but I was assuming it meant my variable names were too long or the datatype was 'long'. Changed it to 'longit' and it works!

On Jun 25, 2009, at 5:56 PM, Victor C. Van Hee wrote:

I'm at the end of my wits -- I've been trying to import a csv file into stata for the last 30 minutes... I've tried converting it to a tab separated file with no luck. I've tried renaming the variable names, no luck. If I delete the first line, it works just fine... Guess I'll just import it without line 1 and rename all the variable names. Anyone know why this is happening? I'm attaching the culprit first line below.

. insheet using traf_reg.tsv
long invalid varname
error in line 1 of file
r(198);

recnum ,lfadd ,ltadd ,rfadd ,rtadd ,prfix ,prtyp ,name ,type ,sffix ,fcc ,zipl ,zipr ,shplng ,fid1 ,name1 ,vol6 ,date6 ,lat ,long ,xstrt ,xdir ,xdist ,date1 ,vol1,date2,vol2,date3,vol3,date4,vol4,date5,vol5,dyna,rutid,tcid

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index