0

I am trying to use the GRTS function and I can't figure out the source of the error that makes it seems like the entire function is unusable.

 test.design <- list( "Deep Lake Fen"=list(panel=c(PanelOne=3), seltype="Equal", over=0))

 grts(design= test.design,       #the GRTS call will reference the Stratdsgn object
 src.frame="shapefile",   #the sample frame is coming from a shapefile
 in.shape ="Leon33_FenCenter",           #the shapefile used is XXXX.shp
 att.frame=att,           #attribute data frame
 type.frame="area",       #type - area vs linear
 DesignID = "STRATIFIED",   #name for the design
 shapefile = TRUE,        # the output- a shapefile
 prj="Leon33_FenCenter",                 #projection to use for the shapefile - same as listed file
 stratum = "Name",            #name of the column containing stratum in .dbf
 #mdcaty = "Stratum",             #name of columnn that identifies the unequal probability category for each element
 out.shape="Leon33_FenCenter_GRTS")      #name of the output shapefile 

This is the resulting error I get when I try to run the above code: Error in grts(design = test.design, src.frame = "shapefile", in.shape = "Leon33_FenCenter", : unused arguments (design = test.design, src.frame = "shapefile", in.shape = "Leon33_FenCenter", att.frame = att, type.frame = "area", shapefile = TRUE, prj = "Leon33_FenCenter", out.shape = "Leon33_FenCenter_GRTS")

Can anyone help determine the source of the error and how to fix it?

  • That error message looks incomplete. The usual form of an error message is `Error in : problem`, but I don't see the `problem` part in your message. – user2554330 Jan 29 '22 at 10:07
  • It would also help if you told us where the `grts()` function came from. – user2554330 Jan 29 '22 at 10:09
  • The only package I could find with the function `grts()` is `spsurvey`. However, that function doesn't have the named arguments you've used. It looks like you're relatively new to SO; welcome to the community! If you want great answers quickly, it's best to make your question reproducible. This includes the libraries you've used sample data like the output from `dput(head(dataObject)))` for objects like `att` in your code. Check it out: [making R reproducible questions](https://stackoverflow.com/q/5963269). – Kat Jan 30 '22 at 07:51
  • Please provide enough code so others can better understand or reproduce the problem. – Community Feb 06 '22 at 03:55

0 Answers0