[R] Assigning cores

2020-09-03 Thread Leslie Rutkowski
Hi all, I'm working on a large simulation and I'm using the doParallel package to parallelize my work. I have 20 cores on my machine and would like to preserve some for day-to-day activities - word processing, sending emails, etc. I started by saving 1 core and it was clear that *everything* was

Re: [R] Code "tags"

2018-10-10 Thread Leslie Rutkowski
like just producing inline comments -- may be useful. > > -- Bert > > > > On Wed, Oct 10, 2018 at 12:43 PM Leslie Rutkowski < > leslie.rutkow...@gmail.com> wrote: > >> Hi all, >> >> I'm trying to get organized about my R programming and I'm

[R] Code "tags"

2018-10-10 Thread Leslie Rutkowski
Hi all, I'm trying to get organized about my R programming and I'm looking for a way to "tag" snippets of handy code that I go back to time and again. At the moment, I just plop .R files into a folder and rely on the file name to guide me. In desperation, I've taken to saving the same chunk as

Re: [R] Unable to Change Library Paths in R 3.5.1 in Windows 10

2018-07-26 Thread Leslie Rutkowski
I've run into this problem on nearly every new machine I've touched in the past year. Here is a solution that has consistently worked for me in Windows 7 & 10: 1. Use .libPaths() to find where packages are being stored. 2. To change this path: Control Panel > search “View advanced

Re: [R] Keep on getting message errors when trying to install and load packages

2017-09-21 Thread Leslie Rutkowski
Hi Paul, I recently ran into file path conflicts and found the following useful (looks like you already know the answer to 1.): 1. Use .libPaths() to find where packages are being stored. 2. To change this path: Control Panel > search “View advanced system settings” > Environment

[R] paste0 in file path

2016-08-31 Thread Leslie Rutkowski
Hi, I'm trying to reshape and output 8 simple tables into excel files. This is the code I'm using for (i in 1:8) { count <- table(mydata$ctry, mydata[,paste0("q0",i,"r")]) dat <- as.data.frame(q01count) wide <- reshape(dat, timevar="Var2",

Re: [R] loading .rda file

2016-08-30 Thread Leslie Rutkowski
kes your work process > >reproducible as you develop it. > > > >Yes, but that's sometimes too inefficient. > > > >And then, some of us do simulations and other expensive > >computations, we need/want to save and re-read. > > > >and yes, I *always* u

[R] loading .rda file

2016-08-30 Thread Leslie Rutkowski
Hi, I'm slowly migrating from SAS to R and - for the very first time - I'm working with a native .Rda data file (rather than importing data from other sources). When I load this .Rda file into the global environment using load("file path") I see a data.frame in the global environment called