To profile R code, Hadley Wickham's package profvis is pretty good, and easy to use. See the vignette for details.
0 Comments
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:
http://stackoverflow.com/questions/18453182/g-errors-when-trying-to-compile-c11-with-rcpp 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) http://www.mirror.co.uk/news/uk-news/breastfed-children-earn-more-money-5358181 "Breastfeeding generally was found to increase adult intelligence, length of schooling and adult earnings." Non-blind data collection leads to more frequent and possibly spurious "significant" results12/17/2016 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: setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) 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 |
Categories
All
Archives
December 2016
AboutThis blog is mainly for statistics, R, or Duke-related stuff that is not directly relating to research activity. |