Issues getting FSA function ‘Depletion’ to work with dplyr
Without getting into the details of the application, I need to run the FSA::depletion(function) in R on a dataframe where the function needs to run iteratively to find a ‘depletion’ value for X number of rows and then proceed to run the operation on the next X number of rows. A dataframe will look something like this:
Turning Character columns containing numbers into Numeric in R
I am working with a dataset that lays out some of it’s data in ways that are not the most useful to later work on. For example:
Create new column combining info from other two columns, regardless of order
I want to create a new column in a data frame that generates a unique value combining info from another two columns, regardless of order.
combine two dataframes in R by the pathway column when the pathways are differing in number
I have two dataframes, lets say df1 and df2 as pictured below. I want to use R to combine them by adding df2 columns to df1 by pathway column. However, I want the pathway to be repeated as many times as present in the df that has more frequency of the pathway. So for example, HALLMARK_ADIPOGENESIS occurs 6 times in df1 while it occurs 4 times in df2. I want in the combined_df to have that pathway repeated 6 times with the 6 rows having values for all the _B1_7486 columns but only 4 rows having values for the _B1_7534 and the remaining 2 rows to be NAs or blank for the _B1_7534. I have tried using merge and cbind and different iterations but have come up short. Any help would be appreciated.
ANY function used with dates to return the date/s in R
i have data like so:
Grouping by identifier from an R dataframe to turn repeat rows into columns
I am relatively new to R and struggling to find a solution to this problem.
How to order a column per group based on its levels
I have a large dataframe with 3 columns for genotype IDs, environment, and trait. I first filter the large dataframe so that it only contains one particular trait:
How to find if an ID appears in each group? [closed]
Closed 3 days ago.
full_join wont work between two dataframes in R “no applicable method for ‘full_join’ applied to an object of class “c(‘double’, ‘numeric’)””
I have two dataframes with similar columns that I’m trying to perform a full_join in R.
Percentage Change over multiple columns in R
I have an R dataframe where I’m trying to calculate % change across a number of columns, yet I can’t seem to work out the correct syntax for it.