Quantcast
Channel: Active questions tagged r - Stack Overflow
Browsing all 201839 articles
Browse latest View live
โ†ง

R Prophet: Issue with Forward Monthly Dates generated using...

I have dataset with ds and y columns. The ds column has last day of each month as shown below:2018-09-30 2018-10-31 2018-11-30 2018-12-31 2019-01-31 2019-02-28 When I use to extend the dataframe...

View Article


Image may be NSFW.
Clik here to view.

Math symbols in gridExtra table column headers

I need to write the greater or equal than math symbol on two of my column headers and printing a gridExtra table but can't make it work. Below is a small Rmarkdown document showing what I am trying to...

View Article


Loop calculation with previous value not using for in R

I'm a beginning R programmer. I have trouble in a loop calculation with a previous value like recursion. An example of my data: dt <- data.table(a = c(0:4), b = c( 0, 1, 2, 1, 3)) And calculated...

View Article

(Invisible?) table created when saving to docx in officer/R

After three years as an R-user I have a problem that havenโ€™t been solved by looking around at stack overflow. Hence this is my first post. Please let me know if I need to be me more specific in the...

View Article

RStudio Required Package Versions Could Not Be Found

I updated my Mac to OS10 and attempting to run RStudio Knit, and get the error:"evaluate 0.7.2 is required but 0.7 is available". I tried this and did not fixed the issue:remove.packages("evaluate")...

View Article


Mac OS X R error "ld: warning: directory not found for option"

I am trying to install an R package from source, but getting an error:* installing *source* package โ€˜mclustโ€™ ... ** package โ€˜mclustโ€™ successfully unpacked and MD5 sums checked ** libs gfortran-4.8...

View Article

Dplyr : unclear usage of any_vars and all_vars predicates when filtering rows...

I am building a network :from <- c("America, port unspecified", "Boston", "Chicago", "America, port unspecified") to <- c("Europe, port unspecified", "Nantes", "Le Havre", "Lisbonn") dataset...

View Article

Image may be NSFW.
Clik here to view.

Removing double values from a column in R

I need to know how many different items are produced by each company (ID). The result should be this:Company 1 = 4 (A,B,C,D)Company 2 = 1 (B)Company 3 = 2 (A,B)Company 4 = 2 (A,B)Which code should I...

View Article


Can't Understand the following R language line [closed]

data %>% select(gid,id, type, idtype, sourcenode, ctime, car) %>% distinct() -> final final %>% group_by(gid) %>% mutate(count = n()) %>% distinct() -> final final %>%...

View Article


Image may be NSFW.
Clik here to view.

mclapply in R programming- How can I make sure all my cores and memory is...

I am working on doing some computation using parallel::mclapply to parallelize the process. I have a High performance computing server (HPC) with 64GB memory and 28 cores CPU. Speed of the code run has...

View Article

Image may be NSFW.
Clik here to view.

How to insert grouped median segments in violin plot in ggplot2

I'd like to insert median lines for factor levels into a violin plot in ggplot2. Here's some reproducible data:set.seed(12) FactorVar <- sample(LETTERS[1:5], 500, replace = T) NumericVar <-...

View Article

find JSON in string with recursion limit in r (windows)

I want to build a function that extracts jsons from strings in a generic way (for variable string Formats) with R on Windows.Thanks to #SO I am using:allJSONS <- gregexpr( pattern =...

View Article

R- How do I convert an UTF8 encoded emoji character to an image?

I have a long vector containing emojis, something like this:emojis <- c("๐Ÿ˜","๐Ÿ˜ฅ","๐Ÿ˜ด","๐Ÿ˜‰","๐Ÿ˜›") and then I have their utf-8 encodings which I extracted with the help of devtools::install_github(...

View Article


How to count occurrences of several strings per row in a data frame in R

i have a question for which I thought I found a solution but if I double checked by hand I got numbers. I searched in other quotes but couldn't get exactly what I am looking for.I have a dataframe with...

View Article

left_join based on closest LAT_LON in R

I am trying to find the ID of the closest LAT_LON in a data-frame with reference to my original data-frame. I have already figured this out by merging both data-frames on a unique identifier and the...

View Article


R Shiny showing dataframe (Text Mining)

i try to make sentiment analysis using R Shiny, this is my code.Server.rlibrary(shiny) library(DT) library(tm) clean_data = function(mydata){ ##CLEANING DATASET## #removeURL removeURL <- function(x)...

View Article

Efficient way to find species specific coefficients for a function call

Andrew Robinson shows in irebreakeR how to compute tree volume using diameter and height. He creates a function which uses coefficients depending on species and diameter. A simplified version looks...

View Article


Problem with a loop in bmi calculator R language

I have problem with school task -> BMI calculator Here is my code #Przedziaล‚y niedowaga <- seq(16.00, 18.40, 0.01) norma <- seq(18.50, 24.90, 0.01) nadwaga <- seq(25.00, 30.00, 0.01)...

View Article

How can I get a 201 API response in R?

I'm trying to get post an API request at an adserver to later get a specific report with the GET function. But first I have use POST with a specific body to specify the report. It works with the talent...

View Article

Data Frame to matrix - many rows

I'm trying to convert data.frame to matrix. I calculated some statistics for iris dataset and want every statistics to be placed in seperate row. Code below shows all statistics (avg and median) in one...

View Article
Browsing all 201839 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>