Hello,
I am trying to import a .shp shapefile containing English local authorities into Stata using shp2dta user written command, but I get an error message saying "long invalid varname" (signalling that the shapefile dataset includes a variable named "long", which is an invalid variable name within Stata - if I have understood correctly).
Is there a way of amending the varname within the shp2dta command to successfully import it?
Or is it necessary to use a workaround by e.g. importing into R to rename/delete the variable called "long" (as noted by Carolin Thol in this previous post: https://www.statalist.org/forums/for...files-in-stata)? If anyone has successfully done this and is happy to share steps, that would be much appreciated (I have managed to upload into R, but it does not display like a "normal" dataset so I have not found a way of amending the variable).
Many thanks!
Francesca
Related Posts with Importing .shp file to Stata with "long" varname
Exporting Stata output to excelDear All, I have a panel dataset. I calculate the mean of each variable for each cross-section unit…
Matching 1-to-1 without replacement when control pool has multiple rows per unitHello! I have a panel of workers (X years X firms). From this panel, I created a sample of workers…
Reshape long with multiple values in iHi all, I want to reshape my data from Code: * Example generated by -dataex-. For more info, type …
A small clarification!I produce here two codes with a slight difference that produce the same output. These codes are base…
join month and day in a single date variableDear all, I have a variable that corresponds to month in the format "2012m1" and a variable that co…
Subscribe to:
Post Comments (Atom)
0 Response to Importing .shp file to Stata with "long" varname
Post a Comment