Tag: r

62 votes
7 answers
2.4K views
How can we make xkcd style graphs?

Apparently, folk have figured out how to make xkcd style graphs in Mathematica and in LaTeX. Can we do it in R

avatar
Thurman
0 1 0 9
asked 07 September, 2021
47 votes
8 answers
773 views
Rotating and spacing axis labels in ggplot2

I have a plot where the x-axis is a factor whose labels are long. While probably not an ideal visualization,

avatar
Rufus
0 1 0 9
asked 07 September, 2021
61 votes
4 answers
2.9K views
data.table vs dplyr: can one do something well the other can't or does poorly?

Overview I'm relatively familiar with data.table, not so much with dplyr. I've read through some d

avatar
Emilia
0 1 0 9
asked 07 September, 2021
53 votes
8 answers
503 views
What are the differences between "=" and "<-" assignment operators in R?

What are the differences between the assignment operators = and <- in R? I know that operators are slight

avatar
Winford
0 1 0 9
asked 07 September, 2021
61 votes
25 answers
2.7K views
How do I replace NA values with zeros in an R dataframe?

I have a data frame and some columns have NA values. How do I replace these NA values with zeroes?

avatar
Alba
0 1 0 9
asked 07 September, 2021
60 votes
17 answers
1.7K views
Remove rows with all or some NAs (missing values) in data.frame

I'd like to remove the lines in this data frame that: a) contain NAs across all columns. Below is my exa

avatar
Jefferey
0 1 0 9
asked 07 September, 2021
58 votes
21 answers
1.6K views
Drop data frame columns by name

I have a number of columns that I would like to remove from a data frame. I know that we can delete them indiv

avatar
Hilario
0 1 0 9
asked 07 September, 2021
59 votes
10 answers
638 views
Grouping functions (tapply, by, aggregate) and the *apply family

Whenever I want to do something "map"py in R, I usually try to use a function in the apply family. However,

avatar
Margo
0 1 0 9
asked 07 September, 2021
54 votes
13 answers
2.9K views
How to join (merge) data frames (inner, outer, left, right)

Given two data frames: df1 = data.frame(CustomerId = c(1:6), Product = c(rep("Toaster", 3), rep("Radio", 3)))

avatar
Dorinda
0 1 0 9
asked 07 September, 2021
64 votes
19 answers
698 views
How to sort a dataframe by multiple column(s)

I want to sort a data.frame by multiple columns. For example, with the data.frame below I would like to sort b

avatar
Venice
0 1 0 9
asked 07 September, 2021
52 votes
23 answers
2K views
51 votes
15 answers
1.8K views
Link and execute external JavaScript file hosted on GitHub

When I try to change the linked reference of a local JavaScript file to a GitHub raw version my test file stop

avatar
Margo
0 1 0 9
asked 07 September, 2021
60 votes
13 answers
2.4K views
Why is a git &apos;pull request&apos; not called a &apos;push request&apos;?

The terminology used to merge a branch with an official repository is a 'pull request'. This is conf

avatar
Adolfo
0 1 0 9
asked 07 September, 2021
58 votes
4 answers
406 views
How can I reference a commit in an issue comment on GitHub?

I find a lot of answers on how to reference a GitHub issue in a git comment (using the #xxx notation). I'

avatar
Rudolf
0 1 0 9
asked 07 September, 2021
58 votes
9 answers
1.9K views
How to state in requirements.txt a direct github source

I've installed a library using the command pip install git+git://github.com/mozilla/elasticutils.git whi

avatar
Keila
0 1 0 9
asked 07 September, 2021
65 votes
21 answers
2.9K views
Remote origin already exists on &apos;git push&apos; to a new repository

I have my project on GitHub at some location, [email protected]:myname/oldrep.git. Now I want to push all my cod

avatar
Thurman
0 1 0 9
asked 07 September, 2021
58 votes
5 answers
1.3K views
How to update a pull request from forked repo?

So I first forked a repo and then made a commit to that forked repo. I then opened a pull request. The pull re

avatar
Lorenzo
0 1 0 9
asked 07 September, 2021
52 votes
5 answers
3.1K views
When does Git refresh the list of remote branches?

Using git branch --all shows all remote and local branches. When does Git refresh this list? On pull/push? An

avatar
Solomon
0 1 0 9
asked 07 September, 2021
59 votes
17 answers
670 views
How to add screenshot to READMEs in github repository?

Is it possible to place a screenshot in README file in a GitHub repository? What's the syntax?

avatar
Alphonso
0 1 0 9
asked 07 September, 2021
63 votes
9 answers
814 views
What is the difference between GitHub and gist?

What is the purpose of gist and how is it different from regular code sharing/maintaining using GitHub?

avatar
Wilber
0 1 0 9
asked 07 September, 2021