Quantcast
Channel: Active questions tagged r - Stack Overflow
Browsing all 206180 articles
Browse latest View live
↧

Intermediate modification of underlying LaTeX when rendering RMarkdown as .pdf

I'm creating a small package for generating exams with randomly ordered questions (and responses on multiple choice items) and the R part is going fine, but now I need a little more control over the...

View Article


Connect additional input to output of intermediate layer in Keras

I want to build a model in Keras in which I densely connect a second input layer to the output of an intermediate layer of the model. Is this possible to do in Keras?PS: I am running Keras on R version...

View Article


Grep unnamed column for row indices

We receive a monthly report in excel format where I only need specific values. Previously, I was able to use readxl to grep the desired column for the row numbers and go from there:library(readxl) file...

View Article

Counting rows where two columns were both NA, then excluding

I am trying to:First - isolate the number of rows where the response in two particular columns was NA (so I can make sure I've done the second step right in terms of how many responses are deleted)....

View Article

R caret package: data partition into training / test sets before trainControl?

I see a lot of R codes where a full dataset is first split into a training set and a test set:library(caret) library(klaR) # load the iris dataset data(iris) # define a 80%/20% train/test split of the...

View Article


How to convert month date (mm.yy) in R to month date (mon yyyy)

If I have date in this format:date <- c('11.17', '12.17', '01.18') How do I change it to this format:'Nov 2017', 'Dec 2017', 'Jan 2018'

View Article

How do I get all the dates with a particular time from a zoo object?

Suppose I have a zoo object of date/times (POSIXct) as my index and values:... val 2006-08-01 10:00:00 1 2006-08-01 10:10:00 2 2006-08-01 10:20:00 3 2006-08-01 10:30:00 4 ... 2006-08-02 10:00:00 5...

View Article

How can I create an object that stores data.frames, and allows one to...

Often times, when I'm using different 3rd party functions, said functions will return some useful data structure that stores a lot of data that I can retrieve with .. Let's say, for example, I'd like...

View Article


Remove rows found in more than 3 groups

I have a dataframe, i am trying to remove the rows that are present in >= 3 groups. In my below example bike is the common value across 3 group and i need to remove that. Please help me to achieve...

View Article


Need to read several .h5 files using loop with indices

I have been given a crap ton of files I need to read over and graph. Some of the datasets have more files that other. So I need to write a loop that will do this. The code that I have written so far...

View Article

R Dataframe Average Group by last months over Users

Suppose I have the next dataframe. How can I create a new "avg" column that is the result of averaging the last 2 dates ("date") for each group. The idea is to apply this to a dataset with hundreds of...

View Article

run a r-script via cmd

I want to run a r-script via cmd.My first try:"C:\Program Files\R\R-3.6.0\bin\R.exe" CMD BATCH U:\Projects\005_Reports\Delta\Delta.R Result: Just an empty line "U:\", the script was not executedMy...

View Article

Create a detector usage table with occasions for columns [closed]

I need to create a detector usage table where the rows are individual detectors and the columns are the full date range over which they all were active. Within this table a 1 indicates the detector is...

View Article


How to set the resolution parameter for Louvain modularity in igraph?

is there a way to set the resolution parameter when using the function cluster_louvain to detect communities in igraph for R? It makes a lot of difference for the result, as this parameter is related...

View Article

shinyBS - remove tooltip when dragging

I'm using dragulaR to create draggable divs in Shiny, and added a tooltip using shinyBS to each div. I was wondering if it's possible to remove the tooltip (I tried adding jQuery from JQuery UI: remove...

View Article


to "1996-04" in R (using as.Date and format functions )">Problem when I try to convert a data.frame string with date from "1996-04-22"...

I have a data frame with a some Dates, I have to convert a format "1996-04-22" to "1996-04" in R. I have the good conversion but not in data type Date and when I tried to convert this to data type...

View Article

Problem with hdf5r finding libhdf5_hl.so.100 file

I'm trying to correctly load the R package hdf5r, well actually I want to use a dependency of hdf5r, but I'm running into problems with the hdf5r package. I've installed the hdf5r package, and no...

View Article


In the train method what's the relationship between tuneGrid and trControl?

The preferred method in R to train known ML models is to use the caret package and its generic train method. My question is what's the relationship between the tuneGrid and trControl parameters? as...

View Article

Using a list to select function to execute

I am trying to create a list with strings that depending on the value of a variable executes different functions. This would be the code at this moment:### Functions to be executed execute_spain <-...

View Article

Issue with sapply when determining if nested list has all NA values in R

I have a nested list (or list of lists) with NA randomly allocated values. I am trying to determine if the nested list contains all NA values. For example: #Example list with NA values...

View Article
Browsing all 206180 articles
Browse latest View live