To profile R code, Hadley Wickham's package profvis is pretty good, and easy to use. See the vignette for details.
I don't know where you're supposed to add this #define, but anyway here's what my note was:
To enable Rcpp debugging, as part of an answer on old Rcpp listserv Romain suggested:
"Maybe you can enable some rcpp debugging by adding
#define RCPP_DEBUG_LEVEL 1
Before you include Rcpp.h, this will give you verbose output, maybe this will help locating the issue. "
I wasn't able to compile an Rcpp file with sourceCpp() on the DSCR cluster. The reason was that some kind of compiler flags needed to be set to use C++11. So I followed the suggestion here:
i.e. all I did (it appears so far to work) is to create ~/.R/Makevars (the directory had to be created too) and place the following line in it:
PKG_CXXFLAGS = -std=c++11
Then the Rcpp file compiled.
But because I spent time on it, here is how to get Pycharm working with jupyter notebooks:
Great article in here by Hadley Wickham on the reshape package. Excellent short read for understanding HOW to think about the format of data. Has the additional benefit of sort of teaching you how to use melt etc.
Is this really a causal relationship? Here's an example of questionable statistical language in the news. Brazil breast-feeding study.
Another one (definitely no link to the actual study in here)
"Breastfeeding generally was found to increase adult intelligence, length of schooling and adult earnings."
How to allow a script to set the working directory to the location of that script file. Richie Cotton's answer here:
(REQUIRES use of Rstudio!)
Use the commmand:
Only display a single app at once:
defaults write com.apple.dock single-app -bool true; killall Dock
Disable the Desktop icons being shown.
defaults write com.apple.finder CreateDesktop -bool false; killall Finder
defaults write com.apple.finder CreateDesktop -bool true; killall Finder
This blog is mainly for statistics, R, or Duke-related stuff that is not directly relating to research activity.