Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • spshape2dta: error "filename required"

    Dear forum,

    Maybe I overlooked something but I am using spshape2dta, downloaded the relevant shapefiles (NUTS_LB_2016_4326.shp and NUTS_LB_2016_4326.dbf) and told Stata to work in the directory the files are saved in.

    However, when running
    spshape2dta using NUTS_LB_2016_4326, database(db) coordinates(coord) genid(id)

    I get the following error message:
    filename required
    r(100);



    I tried other sets of shapefiles but the problem remains. Does anybody know what to do?

    Friedrich
    Last edited by Friedrich Hula; 19 Nov 2019, 08:25. Reason: spshape2dta shape2dta

  • #2
    Replacing spshape2dta by shp2dta should do the trick. See the help files for both commands (in all honesty, I didn't even know spshape2dta was an actual command).

    Comment


    • #3
      Of course, I started with the command shp2dta. But then I get another error (see here https://www.statalist.org/forums/for...base-data-type) and the solution is to use the spshape2dta command.

      Does anybody else have an idea? Sorry I know an r(100) error is maybe to simple but I don't know what I am doing wrong...

      Comment


      • #4
        The help file for spshape2dta suggests the syntax would be:
        Code:
        cd "c:\somefolder"
        spshape2dta NUTS_LB_2016_4326
        This is not tested.

        Comment


        • #5
          Ah that worked. Hm, I read the help file too, but I simply thought that the syntax is equal to that of shp2dta. Thank you!

          Comment

          Working...
          X