sapply
Apply function to each column in a data frame observing each columns existing data type
I\'m trying to get the min/max for each column in a large data frame, as part of getting to know my data. My first try was:[详细]
2023-04-03 03:11 分类:问答compare adjacent elements of the same vector (avoiding loops)
I managed to write a for loop to compare letters in the following vector: bases <- c(\"G\",\"C\",\"A\",\"T\")[详细]
2023-03-25 07:55 分类:问答Using "..." and "replicate"
In the documentation of sapply and replicate there is a warning regarding using ... Now, I can accept it as such, but would like to understand what is behind it. So I\'ve created this little contrive[详细]
2023-03-20 23:26 分类:问答Ignore NA's in sapply function
I am using R and have searched around for an answer but while I have seen similar questions, it has not worked for my specific problem.[详细]
2023-03-15 23:50 分类:问答Concatenate row-wise across specific columns of dataframe
I have a data frame with columns that, when concatenated (row-wise) as a string, would allow me to partition the data frame into a desired form.[详细]
2023-03-12 05:53 分类:问答Improving R coding with sapply help
I\'m struggling with a bit of code.I can get it to work very inefficiently, but thought that there must be a better way to fix it.I am trying to compile a variable from several different variables.In[详细]
2023-02-21 04:09 分类:问答How to rewrite a "sapply" command to increase performance?
I have a data.frame named \"d\" of ~1,300,000 lines and 4 columns and another data.frame named \"gc\" of ~12,000 lines and 2 columns (but see the smaller example below).[详细]
2023-02-16 15:40 分类:问答Apply a function to every row of a matrix or a data frame
Suppose I have a n by 2 matrix and a function that takes a 2-vector as one of its arguments. I would like to apply the function to each row of the matrix and get a n-vector. How to do this in R?[详细]
2023-01-25 22:44 分类:问答How to make FuzzyFinder pluggin open files in a new graphical tab in MacVim?
When I use FuzzyFinder plugin to open a new file in MacVim, it opens the new file at the same tab in a new buffer.[详细]
2022-12-24 08:31 分类:问答