Hear, hear, hear! In September GESIS organizes its regular and reputable Fall Seminar in Computational Social Science. As a part of that event this year I will be offering an intensive 5-day in-person #course on Social Network Analysis with R #rstats . Registrations are open! Details and links below.
@abhi@mikelech I think of it as more of a chef's knife for R and less of a Swiss Army Knife for several languages. Yes, both work with R and I use both VSCode(ium) and RStudio, but I still gravitate to RStudio for my R work... #RStats#RStudio
@mikelech@abhi Sorry for jumping in, I don't wanna be "that guy", but have you considered giving Emacs a try? #ESS (Emacs Speaks Statistics) is the mode (i.e extension) that provide #Rstats and #Julia development features (syntax highlughting, debugging, repl, completion, ...). This way you have one program (Emacs) with one set of keybindings and theme and ... with which you can work with R, Julia, notebooks, ... and in GUI or in terminal, local or remote. https://ess.r-project.org
#Rstats thing I learned today: writing functions using pipes and tidyverse code needs special indexing of paremeterized columns
For example: If you want to index a column via a function parameter within
myfun <- function(data, param){
}
and param is used to index a column of a df or tibble, you need to index it with double curly brackets like this inside functions:
data |> mutate(new_var = mean({{param}}))
The reason: strings do not work, computed columns do not work.Your indexing tricks like square brackets or dollar notation do not work. The curly brackets enable function input similar to object notation without quotation marks. They translate your variable to the correct namespace
That was a great #rstats@rstats history talk, putting the development of the S language that was revolutionary at its time in 1970s, and the open source port of it in 1980s. Help to understand the roots.
Unfortunately, I was affected by layoffs at Posit PBC. I'm still processing this big change, but I'm now open to work.
If you're looking for a data scientist or someone more broadly with experience in R, package development, causal inference, Rust, and many other skills, please reach out to chat!
If you're curious about my work, check out my GitHub
One of the ideas that has driven @rOpenSci's peer-review system is just this: that niche "long-tail" scientific software can have important applications despite a small audience. We try to get useful quality control and feedback to those lone developers doing that important work but don't attract thousands of users or contributors. #rstats
In which I consider the data on how many trans people in the United States have been forced to flee in response to the wave of anti-trans legislation sweeping the nation. #rstats
When I read R code and see people have very liberally used tons of packages like there is no tomorrow, I cringe. This is bad when they are doing it in research. Basically what they are doing is addicting their analysis and research to tons of packages. Like any other addition, when they don't get their fix, it's gonna hurt, and gonna hurt bad. Their research's reproducibility is close to non-existence as none of those packages will be around for ever. Pick dependencies carefully.
@LeafyEricScott@Mehrad Yeah. "Do one thing and do it well" implies using lots of packages. Leveraging the awesome #RStats community is good. Otherwise, just dismantle CRAN, retire all packages and write code like an elderly recluse in a cave.
@Mehrad@LeafyEricScott Your tone ('wannabees "data scientists"', 'lazy') is extremely gatekeepy and toxic. People in the #RStats community have different experiences, levels of expertise, and needs. This demeaning language has no place in our community.
I've been playing a bit more with #MicrosoftExcel these days
Although #Excel shouldn't be used to analyze data (don't use spreadsheet apps to analyze data, use #Rstats or an equivalent instead), Excel is by contrast very useful to store data in an organized way
Occasionally, I think about how to work effectively with #rstats. Currently, I am teaching my #bioinformatics courses with #RKWard again. I try to do most of it with packages from the base installation. #datatable is an exception. But otherwise, I like to use #within (very fast) instead of #mutate.
But there are more approaches, which are often simpler/faster/stable:
@magljo I used to use Rkward before starting Rstudio. It is a good spftware and has almost everything one need. I even have it always installed along with Rstudio. The only things that it does not have and I desperately need is being able to run it remotely. I use Rstudio server and Emacs for remote work in #rstats . I can say that Rstudio server is way more stable if TCP ports can be opened and accessed through firewall, otherwise i just use Emacs' ESS and Tramp.
Dear #rstats community, I have a problem.
I have a df with multiple char columns which I want to coerce to factors and a list of pre-defined factor level orders (vectors) that I want to apply in the process. Now apparently this isn't a wide-spread thing to do. I am using #tidyverse code.
My approach of
df <- df |> mutate(across(all_of(charvars), ~factor(., levels= levellist[[which(factors==cur_column())]]))
throws me an error telling me it "cant compute the first column ("who")" followed by "internal error"...backtrace attached. My problem is: I used the same approach literally 3 lines above on different subsets before and it works!