RenderUI for both table and plot?
I have somehow tried to make an application to extract all stocks data. The below code is working. But, at the last, there are radio buttons like shown below. So when I click the radiobuttons (All,...
View ArticleR - terrible parallelisation performance within a function due to pointless...
Once a function environment has some stuff in it, serializing all this stuff (even when it is not needed) adds a big overhead to parallelization. Is there then an effective way to use parallelization...
View ArticleKeeping numeric type when adding a character symbols in R
This is an example:df <- structure(list(Longitud = c(-179.75, -179.75, -179.75, -179.75, -179.75, -179.75), Latitud = c(71.25, 68.75, 68.25, 67.75, 67.25, 66.75), Enero = c(-23, -26, -25.9, -24.1,...
View ArticleCannot import XLSX file
I am trying to import an XLSX file into R to begin my class project. It is giving me issues, as it returns a result with 0 variables. I have tried to rework the pathway to the file multiple times with...
View ArticleAdding label to geom_sf returns error for stat_sf_coordinates
I'm currently trying to add labels to a map of US counties, that display the county name. I visualized the map using geom_sf and everything works out fine. I specified some other things like the fill...
View ArticleQuantitative Finance Cox Ingersoll Ross conversion Matlab to R, from...
I am trying to convert the following old Mᴀᴛʟᴀʙ™ to R. Here the old Mᴀᴛʟᴀʙ code:sw=[2.40096 2.72778 3.09914 3.25061 3.29394 3.63792 3.90653 3.92677 3.85058 4.14440 4.43973 4.27808 4.82375 4.56853...
View ArticleHow to replace outliers with values inside the IQR for multiple variables and...
I have a dataset similar to iris, and need to write a function that deals with outliers in the following way: for each species setosa, versicolor, and virginica, within each variable iris$Sepal.Length,...
View ArticleWhat's the shortest code to generate the below matrices in R?
My 1st post - Just started learning R and I am trying to generate the below matrices using the shortest code possible and can only think of the long/manual way. Any help would be appreciated.
View ArticleSelenium message:stale element reference: element is not attached to the page...
I want to extract links of hits from google search with Rselenium. I cannot get past this error, can somebody point out what I am doing wrong, how to solve this? Example:library("RSelenium") google...
View ArticleCalculating several regression analysis with specific columns in lapply
This is my data:df1<-read.table(text=" Time1 Time2 Time3 MNR1 MNR2 MNR3 36 36 43 5 4 5 40 41 51 4 6 4 38 36 50 7 8 3 35 51 43 8 3 2 52 55 57 3 2 4 ",header=TRUE) I want to have a loop using lapply (...
View ArticleHow do I use the model DRM fit to my data in R (forward prediction - not...
First - thanks to all who contributed to writing the drc package!I have a four parameter logistic LL.4 model that fits my data well. Yay! I can't find documentation detailing usage of the model though!...
View ArticleWhich extraction method is the fastest?
Given listli = list(a = list(b = list(1:3))) the following extraction methods give identical result:li[["a"]][["b"]][[1]][[2]] [1] 2 purrr::pluck(li, "a", "b", 1, 2) [1] 2 for (i in list("a", "b", 1,...
View Articlesummary() function providing extra information
Team,Does anyone know why my summary(model) the model used was loglm() output is providing extra information? What are the options for the summary() function. How do I remove the attr data from my...
View ArticleHow to split data in r
When i tried to split data mentioned in the image is not as per requirement. can any one please help.
View ArticleGood way to represent odds ratios and p-values in R or Python
Let's say I have n binary variables, and I want to compare them with n^2/2-n chi-square tests. As a result, I can get for each interaction an odds ratio (OR) and p-value. These can be shown like two...
View ArticleUsing a for loop to create new datasets in the environment
I am trying to use a for loop to filter a large dataset by year. I then want to create new datasets in the global environment that I can use for further calculations. creating list of yearsyears <-...
View ArticleHow to calculate maximum diferences among different number of columns for...
I have a dataframe (df) with average Current Intensities for two different sites (A and B) and for different depths (5 meters C.I.5m, 12 meters C.I.12m, 20 meters C.I.20m, 28 meters C.I.28m and 35...
View ArticleCustomize legend labels for continuous variables cut into several categories...
I am drawing a choropleth map for US counties. I randomly created a variable dumb that is uniformly distributed between 1 and 100 and cut it into 6 categories, which is stored as dumb_quantiles. I then...
View ArticleWhich R function to use with a specific dataset?
I'm new with statistics and R-studio so if there's anyone among you who can help through this, they will save me.I have a data file containing data on whether two algorithms for deep learning model...
View Articlehow can I create identical result without using as_tbl_graph()?
My dataframe looks like this.Word1 Word2 Count -------------------------- a b 4 c a 2 b c 1 ------------------------- I want the following result.from to count ----------------------- 1 3 4 2 1 2 3 2 1...
View Article