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

Download leaflet map as a png when shiny app is deployed

I have a shiny app where users create maps and then can download them. Locally, this works, but when I have deployed it to shinyapps.io, the download feature no longer works and it indicates it is...

View Article


Calculate date of birth given age

I have the data below.ID = 201 Age = 40 How do I calculate the Date of birth using this info and the Sys.Date() function?!

View Article


How to apply function over a list by taking list of list elements as function...

Reproduce-able data set- set.seed(55) data <- rnorm(8) dates <- as.POSIXct("2019-03-18 10:30:00", tz = "CET") + 0:7*60 dataset <- xts(x = data, order.by = dates) colnames(dataset) <- "R"...

View Article

Kendall's tau for two binary variables

I have to calculate many correlations with mostly ordinal variables and I use Kendall's tau for this. In some cases there is one binary and one ordinal variable and in some cases there are two binary...

View Article

How can I create RMarkdown files that render good in PDF and HTML which also...

I have been working on some documents that should render in both HTML and PDF. For referencing in Latex I have used the \ref{fig:fig1}style and giving figures a numbered caption.For referencing in HTML...

View Article


Store dataframe to Google Cloud Plateform (GCP) in R

I am learning programming in R language and want to learn storage basics. I have created an R script that gets data from Google Analytics API and stores it in a local dataframe (on my own computer) to...

View Article

How to perform a one-sample t-test for each row in just one column in R?

In my dataset I have 14 columnes and originally 48 rows. I reduced row size to 2, because working on problems on R is much easier for me, like this. The first column consists of a participants number,...

View Article

reusing ouputs$xxx across tabs in navbarPage

Im fairly new to Shiny - especially how to make thecode compact and avoid duplication. To simplify my problem (code below): I want to make use of the navbarPage, because i like the overview it gives.In...

View Article


Minimising objective function problem using lpsolve in R

I'm tackling a simple linear optimisation problem. I have a bunch of crops with have their associated land requirements per tonne and their water footprints per tonne. I want to know how many tonnes of...

View Article


Rule tables to avoiding nested ifelse statements

Idea is to have manageable approach to define rules from some table:library(data.table) a <- data.table(rule = c("rule1", "rule2", "rule3"), bool = c(T,T,F)) a # rule bool # 1: rule1 TRUE # 2: rule2...

View Article

Image may be NSFW.
Clik here to view.

Interdependent Network visualisation

I've come across some questions when using muxViz (the package developed by Manlio De Domenico with R and GNU Octave -- thanks for developing this!).I was trying to create and visualise an...

View Article

How to apply wilcox test on the predicted data in R?

We use the following code for k-fold cross validation training data when we have one data file,set.seed(308) rand_search <- train( Effort ~ ., data = d, method = "svmRadial", ##Create 20 random...

View Article

How can I do a break or white space in line plot in R

I want to know how can I do a break or white space in a line plot in r using only the function plot, cause I have a big project and I can't change for ggplot. For example I have data of temperature all...

View Article


equivalent to R's `do.call` in python

Is there an equivalent to R's do.call in python?do.call(what = 'sum', args = list(1:10)) #[1] 55 do.call(what = 'mean', args = list(1:10)) #[1] 5.5 ?do.call # Description # do.call constructs and...

View Article

2 by 2 table (Class*Sex) using Titanic data from R package "titanic"

I am working on R system data from the R package titanic install.packages("titanic"). The name of the dataset is titanic. I want to conduct a Chi-square test between Class and Sex. I think before doing...

View Article


Convert a factor column with numbers in k format into numeric without losing...

I have a factor column which has numbers in it. Some numbers are written in k format, for ex. 99k, 9.25k, 91.9k, etc. while others are written in whole like 998, 575, etc. Two things I want to do-:I...

View Article

Image may be NSFW.
Clik here to view.

Import and transform multiple xml files into DF

I am trying to create a routine for importing numerous xml files from a given directory. Possibly I will have to import over a thousand xml files at one time and turn them into dataframe. I have...

View Article


Image may be NSFW.
Clik here to view.

In geom_sf_text, how to nudge x and y in aesthetics?

I would like to nudge the x and y position of text in ggplot2, using sf. The justification of text can be modified in aesthetics, which then requires nudging to be also modified similarly, but nudge_x...

View Article

Read multiple csv files (and skip 2 columns in each csv file) into one...

I have a folder of about 100 csv files and I want to read them into one dataframe in R. I kind of know how to do this but I have to skip the first two columns in every csv file and that is the part I...

View Article

Where is Tidyverse dev version source code located?

The dev version of dplyr introduces a new across() function that applies functions to a selection of columns. I can install the dev version of dplyr in R like this:# install.packages("devtools")...

View Article
Browsing all 205399 articles
Browse latest View live


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