braverock / FactorAnalytics

67 stars 63 forks source link

Error in data("factorDataSetDjia5Yrs") #16

Closed JiaruiWang-Jill closed 3 years ago

JiaruiWang-Jill commented 3 years ago

Hi, I followed the steps to install "FactorAnalytics" and "ExpectedReturns".

However, when I run the following code chunk: library(ExpectedReturns) data("FF3.monthly") data("factorDataSetDjia5Yrs")

"FF3.monthly" can be correctly loaded. "factorDataSetDjia5Yrs" will give the following error.

Error in load(zfile, envir = tmp_env) : 
  bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file ‘factorDataSetDjia5Yrs.rda’ has magic number 'versi'
  Use of save versions prior to 2 is deprecated 

My environment is R = 4.1.0, RStudio-1.4.1717 (windows 10).

Thanks and look forward.

JustinMShea commented 3 years ago

Hi @JiaruiWang-Jill , it appears you'll need to install Git Large File Storage. @braverock just moved us to LFS, which appears to be a good solution for us. 0b6e518af146f9fcd4c469331e34f35012cac041

Please install and then try again. See below for more information.

https://docs.github.com/en/github/managing-large-files/versioning-large-files/installing-git-large-file-storage

https://git-lfs.github.com/

JiaruiWang-Jill commented 3 years ago

Hi @JustinMShea , I installed git large file storage and re-cloned the github repo. However, it still shows

> data("factorDataSetDjia5Yrs") 
Warning: file ‘factorDataSetDjia5Yrs.rda’ has magic number 'versi'
  Use of save versions prior to 2 is deprecated
Error in load(zfile, envir = tmp_env) : 
  bad restore file magic number (file may be corrupted) -- no data loaded

Can u help me take a look? Thanks.

JustinMShea commented 3 years ago

Hi @JiaruiWang-Jill,

As discussed on Slack, we have independently verified that the data is loading fine.

Again, please see the guide we provided on creating a reproducible example when asking for help. At a minimum, this includes information about your operating system and version of R.

I am closing this issue as this is a problem specific to your setup, not the FactorAnalytics package.

Please follow up on our Slack, and list all steps you have completed in an attempt to solve this issue.

sstoeckl commented 3 years ago

Hi everybody, I tried to clone and install the repository myself and find that you guys might be over your lfs quota:

C:/Program Files/Git/bin/git.exe clone --progress https://github.com/braverock/FactorAnalytics FactorAnalytics Cloning into 'FactorAnalytics'... remote: Enumerating objects: 4930, done.
[...] Downloading data/factorDataSetDjia5Yrs.rda (31 KB) Error downloading object: data/factorDataSetDjia5Yrs.rda (0319ca6): Smudge error: Error downloading data/factorDataSetDjia5Yrs.rda (0319ca661fc4fb213d3ce507bc50da7e9f8d711e76cb02eff7bdc6b9da1e6b4f): batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.

JustinMShea commented 3 years ago

Thanks @sstoeckl...this issue should be resolved now