Results for dplyr
I'm needing a more flexible method to extract values from multiple columns into column "y" where the last character in "x" == the last character of th...
I have a general piece of code A that comes up repeatedly in a series of programs. Each instance of A assumes the form output_data = input_data %>% ...
How can I index to an ith column within join_by a .frame( a.1= 1:4 ) b .frame( b.1= 1:4 ) inner_join( a, b, by= join_by( x$a.1 $b.1 ) Suppose we are u...
The code I've got so far works fine, but I want to include in the output certain Majors with zero count. Having read around it looks like the solution...
Searched SO and surprised I couldn't find a solution, hopefully not a duplicate. And perhaps this is more a logic question rather than an R question p...
When using dplyr::arrange() with Greek text, it does not order the data correctly. Here's an example: library(dplyr) wds "θέση", "ταχυδρομείο", "γραμ...
i tried to summarise the data in dplyr vs base r functions but dont get the expected result, please let me know why for example i tried the string as ...
I'm preparing a function to graph trigonometric functions. I have written a function which successfully returns the correct value when given the param...
I'm trying to create a new column in a dataframe with dplyr::mutate(). There are two cases for the column the data is taken from: The original column...
So I am looking to create a density plot using a binary grouping variable. See the data below but the x axis is each numeric interval from 0-4, the y ...
I've done this in Base a bunch by manually entering the conditions that need to be met in order to set a new value of a new cell, but I really want to...
I've written R code to produce a periodic report that requires re-ordering of Week numbers such that I can filter and order by the most recent 10 week...
Translate dplyr::filter into data.table code. Let's supposse I have: library(data.table) library(dplyr) dt data.table( A = c(TRUE, TRUE, TRUE), ...
What I would like to achieve in general would be that I could do the following: df %>% exampleFunction(1) %>% exampleFunction(2) %>% examp...
I am trying to add a column to my df that will conditionally sum a column by group. When the value in the margin column is negative, it works fine. Ho...
I am unable to get dplyr (v. 1.1.2) to keep only minimum row values for a group of two variables when there is a NULL value in the group. Using na.rm ...
I have some data from a sporting club, and wish to summarise player data over each season. The issue that I have is that the source database generates...
I am filling in the columns by group but it doesn't work as expected. My goal is to fill dates and then compare dates in each row and find the oldest ...
I was wondering on how to separate into two diffrent chunks of the dataframe, a big dataframa and then make the column binding in dplyr I have use the...
I have records in a dataframe that I want to duplicate multiple times, and apply some changes to each iteration of duplicate rows. Using the following...
I have my R environment with some objects in it. tmp 1,2,4) dafa "Yes", value=4) Lists and Dataframes both come up as list when using: ty...
Dataset My simulated data looks like this: combo -0.184530460239927, 2.58876410608302, -0.376411897125282, -0.918020987034264, 0.267794817079365, 0.5...
There is time series ttrc_total , when applying the dplyr function group_by mutate ..., there are failures. Is there way to solve it? Thanks! library...
Consider the following: library(magrittr) sapply(c("dplyr", "tibble", "tidyr"), requireNamespace) mytbl structure( list( A = list(c("A.1", "A.2...
I have DATA = data.frame(GROUP = c(1,2,1,2,1,2), TIME = c(1,1,2,2,3,3), SCORE = c(0,7,9,8,3,4)) and seek to create WANT = data.frame(GROUP = c(1,2,3,1...
How do I undo the most recent local commits in Git?
How can I remove a specific item from an array in JavaScript?
How do I delete a Git branch locally and remotely?
How can I find all files containing a specific text (string) on Linux?
How to find all files containing specific text (string) on Linux?
How do I revert a Git repository to a previous commit?
How do I create an HTML button that acts like a link?
How do I check out a remote Git branch?