Convert an R object to a "class Design" object

Hi dear Rstudio savers….
Could anyone give me the way to convert an object to a "Class Design" object…. Which is required by the function "Dopt.augment"... ? I found nothing in the whole "Dopt.augment" description pdf, etc... which helps on this…
Thanks in advance

We don't really have enough info to help you out. Could you ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.

If you've never heard of a reprex before, you might want to start by reading this FAQ:

Hi @Gilles. As I don't familiarise with this function, but from the example of the help. Dopt.augment's help shows that the design class object was using function Dopt.design to construct.

Thanks but I never succeeded to make a replex example... I go on my investigations

Yes Raytong
I red this but this function (Dopt.design) is to create a design, not to augment an existing one...!
And the only function to do so is supposed to be "Dopt.augment" with the first argument specifying the existing design which is traditionnaly expressed as data.frame...... And very surprisingly, this is rejected because it has to be of "class Design" which does not exist !!!! I think this function stayed at experimental level, unfortunately. It appears that it is not yet possible to augment an existing experiment withing D-optimal algo... If I found a path, I will get back to this forum, of course.. Thanks for youe attention

Are you able to run the examples from the Dopt.augment() documentation without error? That's usually a good starting place for making sure you understand how the functions in a package are meant to be used. As @raytong suggested, it looks like you first need to create a design object using Dopt.design() before you can augment it using Dopt.augment(). According to the DoE.wrapper documentation, a design object as defined by this package is:

a data frame of S3 class design with attributes attached.

This is not the same thing as a regular data frame (the attributes expected to be present are extensive), so I think you will need to rely on Dopt.design() to process your data frame into the required format. If none of that is working, then for something this specific your best bet is probably to contact the package author.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.