Related
Alessandro Jacopson I know functions cumsumin R that compute the cumulative sum of its vector arguments. I need the "cumulative apply" not a summation function, but a "generic" function, which in my specific case is this quantilefunction. My current solution i
Alessandro Jacopson I know functions cumsumin R that compute the cumulative sum of its vector arguments. I need the "cumulative apply" not a summation function, but a "generic" function, which in my specific case is this quantilefunction. My current solution i
Alessandro Jacopson I know functions cumsumin R that compute the cumulative sum of its vector arguments. I need the "cumulative apply" not a summation function, but a "generic" function, which in my specific case is this quantilefunction. My current solution i
Dragon I have the following dataframe and like to apply a custom cumulative formula to the columns. How should I put them in a function and apply it to the new column? thank you very much! Excel formula: new column =(previous period value + 1) * (1 + current p
Dragon I have the following dataframe and like to apply a custom cumulative formula to the columns. How should I put them in a function and apply it to the new column? thank you very much! Excel formula: new column =(previous period value + 1) * (1 + current p
Dragon I have the following dataframe and like to apply a custom cumulative formula to the columns. How should I put them in a function and apply it to the new column? thank you very much! Excel formula: new column =(previous period value + 1) * (1 + current p
Dragon I have the following dataframe and like to apply a custom cumulative formula to the columns. How should I put them in a function and apply it to the new column? thank you very much! Excel formula: new column =(previous period value + 1) * (1 + current p
Dragon I have the following dataframe and like to apply a custom cumulative formula to the columns. How should I put them in a function and apply it to the new column? thank you very much! Excel formula: new column =(previous period value + 1) * (1 + current p
Dragon I have the following dataframe and like to apply a custom cumulative formula to the columns. How should I put them in a function and apply it to the new column? thank you very much! Excel formula: new column =(previous period value + 1) * (1 + current p
Dragon I have the following dataframe and like to apply a custom cumulative formula to the columns. How should I put them in a function and apply it to the new column? thank you very much! Excel formula: new column =(previous period value + 1) * (1 + current p
Ursus Frost I'm looking for a general way to apply an arbitrary function on an arbitrary subset of rows within an arbitrary set of data in R. Here is an example of a function that I have written to group data and then apply an arbitrary function, for example s
Yela I'm feeling pretty stupid right now, but I can only come up with a for loop... I have a dataframe with numeric and factorial columns. I just want the numeric column to scale and the factorial column to stay as it is. E.g > set.seed(160)
> df1 <- data.fram
Ursus Frost I'm looking for a general way to apply an arbitrary function on an arbitrary subset of rows within an arbitrary set of data in R. Here is an example of a function that I have written to group data and then apply an arbitrary function, for example s
Arjun Pankaj I have a user defined function make_datafor creating a dataset . I need to use make _dataand generate 3 different datasets mu_1 <- seq(1:3). I don't know how to use sapplybecause the make_datafunction has multiple parameters, library(dplyr) # for
Arjun Pankaj I have a user defined function make_datafor creating a dataset . I need to use make _dataand generate 3 different datasets mu_1 <- seq(1:3). I don't know how to use sapplybecause the make_datafunction has multiple parameters, library(dplyr) # for
Arjun Pankaj I have a user defined function make_datafor creating a dataset . I need to use make _dataand generate 3 different datasets mu_1 <- seq(1:3). I don't know how to use sapplybecause the make_datafunction has multiple parameters, library(dplyr) # for
Arjun Pankaj I have a user defined function make_datafor creating a dataset . I need to use make _dataand generate 3 different datasets mu_1 <- seq(1:3). I don't know how to use sapplybecause the make_datafunction has multiple parameters, library(dplyr) # for
Arjun Pankaj I have a user defined function make_datafor creating a dataset . I need to use make _dataand generate 3 different datasets mu_1 <- seq(1:3). I don't know how to use sapplybecause the make_datafunction has multiple parameters, library(dplyr) # for
Arjun Pankaj I have a user defined function make_datafor creating a dataset . I need to use make _dataand generate 3 different datasets mu_1 <- seq(1:3). I don't know how to use sapplybecause the make_datafunction has multiple parameters, library(dplyr) # for
MF14 I'm fairly new to programming with R and I'm wondering why this doesn't work: w <- c(1,0)
deriv(~x^2+y,c("x","y"),function.arg = TRUE)(w)
I really want to apply the function produced by deriv() to the variable w. Maybe some background on how to deal with
MF14 I'm fairly new to programming with R and I'm wondering why this doesn't work: w <- c(1,0)
deriv(~x^2+y,c("x","y"),function.arg = TRUE)(w)
I really want to apply the function produced by deriv() to the variable w. Maybe some background on how to deal with
MF14 I'm fairly new to programming with R and I'm wondering why this doesn't work: w <- c(1,0)
deriv(~x^2+y,c("x","y"),function.arg = TRUE)(w)
I really want to apply the function produced by deriv() to the variable w. Maybe some background on how to deal with
MF14 I'm fairly new to programming with R and I'm wondering why this doesn't work: w <- c(1,0)
deriv(~x^2+y,c("x","y"),function.arg = TRUE)(w)
I really want to apply the function produced by deriv() to the variable w. Maybe some background on how to deal with
Paul First time users are here! I'm just learning R and I'm hoping for an easy question. I have a number, array of numbers, and I will make sure that none of the numbers are greater than one. I am trying to do myfct <- function(x) {
if ( x > 1.0 ) x = 1.0
Paul First time users are here! I'm just learning R and I'm hoping for an easy question. I have an array of numbers, numbers, and I will make sure that no number is greater than one. I am trying to do myfct <- function(x) {
if ( x > 1.0 ) x = 1.0
return(x)
John L_10 I have a list of dataframes in R. What I need to do is apply a function to each dataframe, in this case, remove special characters, and return a list of dataframes. Using lapplyand as.data.framethe following command works fine for my needs: my_df =da
alice in wonderland I have a dataset with columns start, end and cost. There are x starting points and y ending points. Each origin maps to y destinations with corresponding costs. My goal is to create a new column that shows the number of destinations reachab
carousel I have a large dataframe full of lyrics for songs. I've labeled the lyrics column so each row is a list of lyrics, i.e. ["You", "say", "goodbye", "and", "I", "say", "hello"]so on. I wrote a function that uses a list of positive and negative words to c
Leo I have a huge boolean 1D numpy array wand a growing list of indices idivided into wsub len(i)+1- arrays . An example of a toy is: w=numpy.array([True,False,False,False,True,True,True,True,False,False])
i=numpy.array([0,0,2,5,5,8,8])
I wish to compute a nu