You downloaded data files, or maybe you compiled them yourself. How will you get those data into R?
R offers built-in functions that let you access either delimited (where a certain character separates values) or fixed-width (where each column uses a certain number of characters) files. Like other popular statistical packages, R even supports its own data file format. Let’s explore some frequently-used functions.
Have you tried working with what look like text data in R only to get back a number or an error about comparing or replacing elements? If this sounds familiar, you may have been working with factor data. Read on for more about how to create and handle factor data in R.
Healthy research requires reproducibility, but R works with so many community-sourced packages that tracking each one’s impact can seem daunting. How can you do it? R’s citation function makes citing R libraries simple.
Did you (or your company, or your government…) try something new? You’ll want to know whether that change made a difference. Fortunately, the R statistical programming language offers easy-to-run tests that can help you compare performance before and after the policy went into effect.
Have a mess of files to read into Python? Maybe you downloaded Kaiko trade data, with unpredictable sub-directories and file names, from Penn+Box. Or maybe you’ve dropped TXT, PDF, and PY files into a single working directory that you’d rather not reorganize. A simple script will find the files you need, listing their names and paths for easy processing.