Use devtools::create on R package initialization when appropriate

We can discuss this one for the next release?
It has use_rcpp, would that do it?

On Jun 24, 2014, at 3:26 AM, Kevin Ushey <notifications@github.com> wrote:

In src/cpp/session/projects/SessionProjects.cpp:

> @@ -113,6 +152,40 @@ Error createProject(const json::JsonRpcRequest& request,
>        if (packageDir.exists())
>           return core::fileExistsError(ERROR_LOCATION);
>
> +      // if devtools is available, and the user has opted in to using devtools,
> +      // short circuit and use devtools::create
> +      if (module_context::isPackageInstalled("devtools") &&
> +          userSettings().useDevtools())
> +      {
> +         error = r::exec::RFunction("devtools:::create")

I don't think so -- devtools::create actually doesn't have any concept of
'source files' to include with a project, so we handle copying files
specified in the source manually.

Perhaps devtools could gain a function like add_rcpp_infrastructure for
something like this.

—
Reply to this email directly or view it on GitHub
<https://github.com/rstudio/rstudio/pull/127/files#r14109183>.