centerforpeaceandsecuritystudies / msslstyleguide Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Easy to solve, but thought I'd note it in case we want to update the repo setup wiki
devtools::install_github("r-lib/usethis")
Gives the following error message:
Downloading GitHub repo r-lib/usethis@master
from URL https://api.github.com/repos/r-lib/usethis/zipball/master
Installing usethis
Downloading GitHub repo ropensci/git2r@master
from URL https://api.github.com/repos/ropensci/git2r/zipball/master
WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 3.5.0 was found. (Only the following incompatible version(s) of Rtools were found:3.4)
Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/.
Installation failed: Could not find build tools necessary to build git2r
Downloading GitHub repo tidyverse/glue@master
from URL https://api.github.com/repos/tidyverse/glue/zipball/master
WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 3.5.0 was found. (Only the following incompatible version(s) of Rtools were found:3.4)
Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/.
Installation failed: Could not find build tools necessary to build glue
"C:/PROGRA1/R/R-351.0/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL
"C:/Users/Andres/AppData/Local/Temp/Rtmp6viIbM/devtools24305e003810/r-lib-usethis-8483d1e" --library="C:/Users/Andres/Documents/R/win-library/3.5" --install-tests
I have trouble with the pipe operator, not sure why.
MWE
iiss <- readRDS(file = paste0(here::here(), '/data/IISS.rds')) %>%
janitor::clean_names() %>%
janitor::remove_empty_rows() %>%
janitor::remove_empty_cols()
Returns error:
Error in readRDS(file = paste0(here::here(), "/data/IISS.rds")) %>% janitor::clean_names() %>% :
could not find function "%>%"
Add links to install Git GUI/Bash proper to the instructions and how that has to be linked in RStudio for projects (what @rexdouglass and @tlscherer covered with me in December)
add github download to setup directions
New package that wraps it with html widget.
https://cran.r-project.org/web/packages/upsetjs/vignettes/basic.html
Thomas, does this look useful to add somewhere?
Scherer - https://github.com/CenterForPeaceAndSecurityStudies/MSSLStyleGuide/wiki/Workstation-Setup#latex
Scherer - https://github.com/CenterForPeaceAndSecurityStudies/MSSLStyleGuide/wiki/Repository-Setup#setting-up-a-new-repository
Scherer - https://github.com/CenterForPeaceAndSecurityStudies/MSSLStyleGuide/wiki/Project-Setup
Scherer - https://github.com/CenterForPeaceAndSecurityStudies/MSSLStyleGuide/wiki/Dropbox-organization
Scherer - https://github.com/CenterForPeaceAndSecurityStudies/MSSLStyleGuide/wiki/Functions-Documentation (just double check that command works)
Scherer - get https://rexdouglass.github.io/How_to_be_Careful_with_Covid19_Counts/global-covid-19-count-data.html access for Brailey
Brailey - https://github.com/CenterForPeaceAndSecurityStudies/MSSLStyleGuide/wiki/R-Notebooks-and-R-Markdown (start with RNotebook or RMarkdown?)
Saving dataset with packages (New procedure) #28:
We're switching over to the recommended method of saving and loading datasets from a package
http://r-pkgs.had.co.nz/data.html
See convert_gw_to_nation.r for an example
We save a file locally as part of the package in a /data/ folder using the command
devtools::use_data(object_you_want_to_save,
overwrite = TRUE)
We then load it
data(object_you_want_to_save, package = "NamedEntities")
qdapTools %l% and Error in [.data.frame
(key, c("x", "y")) : undefined columns selected #29:
For dumb reasons, qdapTools requires your lookup table to be a data.frame, even though it uses data.tables in the back end.
The error message is not that helpful.
write up lessons from Naval Paper
I can't add the proper label MSSL for the request I came here for originally- to get access to MSSL's Dropbox. Email used is [email protected]. Thanks!
The project setup section mentioned making a new issue to get Dropbox access.
My dropbox email is [email protected] (same as on wiki). I am assuming David probably needs access too.
put prefer to use Rmarkdowns and can refresh on the chrome browser
with bookdown have to manually knit each chapter, sometimes have to knit index chapter first
Rex's flow: write each chapter as a Rmarkdown, and then turn into bookdown book
CableExtra citations in tables:
example
https://help.github.com/articles/caching-your-github-password-in-git/
Turn on the credential helper so that Git will save your password in memory for some time. By default, Git will cache your password for 15 minutes.
In Terminal, enter the following:
git config --global credential.helper cache
To change the default password cache timeout, enter the following:
git config --global credential.helper 'cache --timeout=3600'
update and send to Lexis Nexis teams
https://github.com/CenterForPeaceAndSecurityStudies/MSSLStyleGuide/wiki/Project-Setup
Use the words at the end
Possible style guide add-ons from ICBe
I would like access to the rex and MSSL dropboxes.
Please write the latex guide
RegExplain is an RStudio addin slash utility belt for regular expressions. Interactively build your regexp, check the output of common string matching functions, consult the interactive help pages, or use the included resources to learn regular expressions. And more.
https://www.garrickadenbuie.com/project/regexplain/
Rex
Friendly regular expressions for R.
https://github.com/kevinushey/rex
Our style guide seems to have most of this covered, but this resource is still worth a glance
load a table, load a graphic, add and refer to labels, different kinds of comments, track changes, bibliography
Here's a 2018 book based around ggplot
https://rkabacoff.github.io/datavis/
Here's Wickham's 2016 book based on his dissertation. This is mostly walking through the design philosophy of ggplot and why he built a tool to encourage you to think about graphics in the right way
http://www.ievbras.ru/ecostat/Kiril/R/Biblio_N/R_Eng/Wickham2016.pdf
Here's a chapter on graphics in the R for data science book
https://r4ds.had.co.nz/graphics-for-communication.html
That will help with the coding details of plots but what you really need is guidance on how to present. Tom and I learned it through brute force watching hundreds of terrible presentations with some scattered good ones.
Tom and I will rack our brain about cites on presenting statistical results for an audience.
Let me give some quick guidance off the top of my head
-Each plot makes an argument. One plot, one argument. For each plot I want you guys to think through exactly what argument you want that plot to make.
-Each plot should have as much detail as necessary to make that argument but no more.
-The only exception to the above is when there are simple extra concerns you might be able to answer visually and intensively.
So for example, if your argument is that the mean of this group is higher than that group, then maybe you want a bar plot. But the first question might be, are these means statistically distinguishable, so might add confidence intervals. If you're presenting a trend line fit to data, the first question might be what's the underlying support of the data (e.g. is there only one or two data points out here where the line dips low), so you decide to plot the raw points underneath the line.
Some issues with the plots recently
-Poor visually vocabulary. Bars, labels, and colors are introduced in one plot as meaning one thing, and then resused to mean something completely different in the next plot. It's the equivalent of defining a new work "asdasd" and saying it means sky, and then two sentences later, using it to mean front door. Like in music, or movies, or art, or a conversation, you are agreeing with the audience on a set of rules that they expect to hold for some amount of time. If you change those quickly, you piss off your audience.
-Hard to read, constantly changing labels. Constantly turning my head sideways to try to see if a axis label means what I think it means, long variable labels with 3 pieces of information shoved into the same string.
-Plots that aren't self explanatory. Someone should be able to look at our plot and know exactly what it means, even if they're not familiar with all the underlying questions and refferants. If you have to stand there and explain a plot, then it's a failure.
-Including unlike things in the same plot. Sometimes we're including side by side our results alongside other people's results without any clear markings to tell the difference. If 3 bars are our runs, and a 4th is the original paper there needs to be an obvious break there because those aren't the same thing.
Do we use BibTeX? Is there a collection of group .bib files?
Or some other software?
Make the move for easy of editing. Be sure to update links and inform cPASS.
starting a notebook
publishing pages
ReadMe
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.