CfSOtago / GREENGridData

Code to process, document data and analyse data from the Renewable Energy and the Smart Grid (GREEN Grid) project.
https://cfsotago.github.io/GREENGridData/
GNU General Public License v3.0
1 stars 5 forks source link

Failed to install 'GREENGridData' from GitHub #43

Closed RaffertyP closed 4 years ago

RaffertyP commented 4 years ago

I'm getting a non-zero exit status when trying to install onto a Windows machine. I have not had this issue when previously installing on Linux.

NOTE: I am not using the most recent versions of digest or data.table. The most recent versions of these two packages require compiling from source which is proving difficult. I have the most recent binary versions of these packages installed. I don't think this would be the problem but it may be.

My guess is that when the required data files are called using the the read.table() function the 'slashes' in the directory path are facing the 'wrong' way, i.e. for Unix filesystems.

I have pasted the Console output below. I'll keep working on a fix and report back once successful, but in the meantime let me know if you have any ideas.

devtools::install_github("CfSOtago/GREENGridData") Downloading GitHub repo CfSOtago/GREENGridData@HEAD These packages have more recent versions available. It is recommended to update all of them. Which would you like to update?

1: All
2: CRAN packages only
3: None
4: digest (0.6.25 -> 0.6.26) [CRAN] 5: data.table (1.13.0 -> 1.13.2) [CRAN]

Enter one or more numbers, or an empty line to skip updates:3 √ checking for file 'C:\Users\ParkerR\AppData\Local\Temp\RtmpSeTpqr\remotes53407a2343e8\CfSOtago-GREENGridData-3417279/DESCRIPTION' ...

Installing package into ‘C:/Users/ParkerR/Anaconda3/envs/r/Rpackages’ (as ‘lib’ is unspecified) '\aklfs02pi\home1$\ParkerR\Documents' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory.

RaffertyP commented 4 years ago

Notably I cannot get read.table() to open these data files even when pointing straight to them (not as part of the installation process)

read.table("C:\Users\ParkerR\GREENGridData\data\dstNZDates.csv") Error: '\U' used without hex digits in character string starting ""C:\U"

read.table("C:/Users/ParkerR/GREENGridData/data/dstNZDates.csv") Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : line 1 did not have 3 elements

dataknut commented 4 years ago

I've not seen this (but then I've not installed on windows). I will try to replicate on a windows virtual machine. Can you open those files using e.g. excel?

dataknut commented 4 years ago

yep, can confirm I see this issue on Windows 10

dataknut commented 4 years ago

In my case I suspect is a permissions issue in C:\apps\Rlibraries\00LOCK-GREENGridData\00new\GREENGridData/data/circuitsToSum_v1.0.csv which is where it is trying to install it. I guess we could move that data out of /data and put it somehere else since R seems to think data in /data are 'special' ?

dataknut commented 4 years ago

It doesn’t seem to be when it’s in use. Seems to be at setup time. I’ll see if I can fix it

On 21 Oct 2020, at 18:05, RaffertyP notifications@github.com wrote:

That's worth a try. Do you know (or is there an easy way of finding out) every instance that points to that file in the package?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CfSOtago/GREENGridData/issues/43#issuecomment-713721360, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMRXLAA7XGYPCWOLJIGTSLSL4IF3ANCNFSM4SZFGKCA.

RaffertyP commented 4 years ago

Legend, thanks Ben. If it gets too hard I can just run the scripts I need from their source files in that case. Would be nice to have Windows support over the long term though I suppose.

dataknut commented 4 years ago

@RaffertyP try now. Worked for me. Dunno why lol

dataknut commented 4 years ago

thus demonstrating the power and value of here::here() and setting paths to folders ONCE in .Rprofile (or wherever)

RaffertyP commented 4 years ago

It worked! Cheers 👍