shiny app deployed in 2018 on shinyapps.io not working locally in 2019
I worked on a historical slavery map shiny app project during 2018 period.My shiny app whas deployed on shinyapps.io with success. You can have a look to my project hereToday, I want to upgrade my app...
View ArticleRegular expression weird result [duplicate]
This question already has an answer here:Multiple overlapping regex matches instead of one 2 answersBiostrings gregexpr2 gives errors while gregexpr works fine 1 answerCodegsub('101', '111',...
View ArticleMultiple Line Graph in R (ggplot)
I'm trying to plot a multiple line graph using ggplot2. I have a data.table with dates in the format (year-month-day) in the first column. the other columns refer to different strategies and each row...
View ArticleR caret: How do I apply separate pca to different dataframes before training?
I use caret in R. My final goal is to submit different dataframes to separate preProcess pca and then put the PCA-components together in one training with ridge regression. However, see example code...
View ArticleError: no successful events when doing an eventstudy in R using...
I am using the eventstudies package in R and I get:Error: no successful eventsI have a data frame of EventDates: name when <chr> <dttm> 1 BMG169621056 2015-05-20 00:00:00 2 BMG491BT1088...
View ArticleHow to send R variable to bash and again being read by another R process?
I am trying to create a process mainly using R, where a R variable will be sent to bash and then another Rscript file will read that value from bash, do some calculation based on that.My primary R code...
View ArticleError message "Error in .. : could not find function .." [closed]
I wrote a user-defined function in a .R file. lm_Forecast=function(d,h){ if (ncol(d)>=1){ d<-d[complete.cases(d),] #lmmod <- lm(d$`Gross Sales` ~ paste(colnames(d)[2:length(colnames(d))],...
View Articlemaking space between next values on y axis
ggplot(dane, aes(x=państwo, y=całkowiteZarobki)) + geom_point(aes(col=rodzajSportu, size=całkowiteZarobki)) + geom_smooth(method="loess", se=F) + labs(subtitle="Area Vs Population", y="Population",...
View ArticleData manipulation with forecasting data
I am trying to make forecasting for sales from two stores: Store 1 and Store 2. Like results from forecasting with forecasting package I got this two table.First table contain data about MAPE error...
View ArticleConvert sRGB to Lab with convertColor?
I'm trying to work with Lab colour, and need to do conversions from sRGB, ideally with R. I've just given convertColor package a go, and am a little confused. As a test, I'm converting the Macbeth...
View ArticleMatching points to nodes using voronoi tessellation in R
I am trying to match the values of a set of points at fixed locations across multiple years to their nearest nodes that are also at fixed points. To do this I have chosen to use a Voronoi tesselation...
View ArticleUnit test in R with testthat fails but Travis CI build is successful
I am currently working on a toy R package to see how it works with CI. I am trying to use unit tests with the testthat package. I use GitHub and Travis for CI integration.For reproducing the results,...
View ArticleTidy dataframes with special characters
My dataset in csv format (available here) is as follows: I tried to import the data into R with the following document:library(tidyverse) data <- read_csv("<Path to file>\\Sample.csv") When I...
View ArticleBanding Variable in R
For the following code:x <- data.frame(year = c(1730, 1860, 1941, 2011)) century_bands <- data.frame(min_year = c(1700, 1800, 1900, 2000), max_year = c(1799, 1899, 1999, 2099), century_name =...
View ArticleR - Function Within A Function [closed]
How to make a simple function within a function code in R Studio?
View ArticleComputing skewness and kurtosis in stargazer
I will like to know how to compute skewness and kurtosis statistics in stargazer. The built in functions per the documentation does not include the above two descriptive statistics. I would be very...
View ArticleWrite large fixed width dataset in local database using RSQLite with R
I have a many Gb fixed width dataset which I would like to write to a local database using RSQLite, since I can not load it into RAM memory. Does anyone know how to do this?The preferred packages...
View ArticleWhy I need to assign a data.table to a new object to filter rows?
I'm just starting to learn data.table in r and library(data.table) data(iris) iris[Species == 'setosa'] The code above doesn't filter the rows where the species are setosa in the dataset, it just print...
View ArticleChoosing data from one Table that have similar data in another table
I have a very unusual question that involves matching data with similar values in two separate tables in SQL Server. for example, I have two tables:The first table contains the following data:JobID...
View ArticleShiny refuses to draw charts despite there being Output
I wrote Shiny app but for some reason it shows no charts when I run it. I thought it might be due to no Output, but I double checked it and there is one. My uiOutput works perfectly fine and sidebar is...
View Article