KentonWhite / ProjectTemplate

A template utility for R projects that provides a skeletal project.
http://projecttemplate.net
GNU General Public License v3.0
622 stars 159 forks source link

Help: using projecttemplate R within RStudio: Microsoft Azure Data Science VM #278

Closed rsaavy closed 5 years ago

rsaavy commented 5 years ago

Report an Issue / Request a Feature

I'm submitting a (Check one with "x") :


Issue Severity Classification -

(Check one with "x") :

Expected Behavior
Current Behavior

I am just trying to get the project template starting thing to work but I am unable to get it to work.

Steps to Reproduce Behavior

Followed the tutorial up to Load my project

library('ProjectTemplate') create.project('letters') getwd() [1] "C:/Users/RASAAVED/Documents/test"

setwd('~/letters/data/') Error in setwd("~/letters/data/") : cannot change working directory setwd('~/letters/') Error in setwd("~/letters/") : cannot change working directory setwd('/letters/') Error in setwd("/letters/") : cannot change working directory setwd("~/test/letters/data") load.project() Loading project configuration Autoloading cache Autoloading data Munging data Warning messages: 1: In .load.config(override.config) : You are missing a configuration file: config/global.dcf . Defaults will be used. 2: In .check.version(config) : Your configuration is compatible with version 0.5 of the ProjectTemplate package. Please run ProjectTemplate::migrate.project() to migrate to the installed version 0.7. 3: In .provide.directory("cache") : Creating missing directory cache 4: In .provide.directory("data") : Creating missing directory data

Screenshots

image

Version Information

Microsoft R Open 3.3.2 The enhanced R distribution from Microsoft Microsoft packages Copyright (C) 2017 Microsoft R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit)

Loading Microsoft R Client packages, version 3.3.2.0033.

Possible Solution
Hugovdberg commented 5 years ago

You shouldn't call load.project from within the data directory. Try setwd('~/letters') without the trailing slash, it's the only thing I can imagine why you couldn't change the directory (you didn't add the slash after data). If you really can't change the working directory to the root directory of the project then I cannot imagine it's a ProjectTemplate error but rather an Rstudio or Azure error.

rsaavy commented 5 years ago

thank you