R is a free, open-source programming language & software environment for statistical computing, bioinformatics, visualization & general computing. Please use minimal reproducible example(s) others can run using copy & paste. Show desired output. Use dput() for data & specify all non-base packages with library(). Don't embed pictures for data or code, use indented code blocks instead. For statistics questions, use https://stats.stackexchange.com.
I have a data set that shows the score from -2 to 2 for each shop.
df <- tribble(
~shop, ~score_1, ~score_2, ~score_3,
"A", -2, 1, -1.6,
I have a dataset like this: 1=cat, 2=dog,3=duck,4=chicken, 5=donkey
animal_type<-c("1", "1 2","1 2 3","1 2 3 4", "1 2 3 4 5", "...
This is probably a really obvious mistake, but I have been trying a number of things and I do not seem to be able to get the right answer.
From R, I try to execute the following DELETE SQL statement ...
I'm encountering an error with dplyr::bind_rows() which I don't understand. I want to split my data based on some condition (e.g. a == 1), operate on one part (e.g. b = b * 10), and ...
I have a large dataset with a bunch of columns. I have one column titled (rowsums), that are the sums of values in a PTSD questionnaire ( greater than 33 is likely PTSD diagnosis). I want to be able ...
I am having a bit of trouble getting my legend title to center over my legend when it is on the bottom. I can only do it if I change the legend to vertical instead of horizontal. Here is my code and ...
How to install R serve as a service in Windows.
Installation of R serve is simple process in windows but what about service. I have tired but some how I could not get proper way to do it . can anyone ...
I am trying to run the following code in R, but I am getting an error for scatter plot3D. The code is as follows:
img_me4lt1 <- melt(img1)
img_melt2 <- melt(img2)
par(mfrow = c(2,2))
I have a rather complex function that I'm using to compute aggregates of raster-cells (downsampling). In this function I'm distuingishing between multiple cases, where the case determines which ...
Goal: To create a pdf with R markdown that includes a DiagrammeR flowchart.
My steps: I ran the code below to render a flowchart created through DiagrammeR. Reviewed and tried documentation and code ...
Given this data:
gather(-mpg, -hp, key = "var", value = "value") %>%
gather(-mpg, -hp, key = "var", value = "value") %...
I have a data frame and one of the columns contain both continuous data and NA. I want to recode all continuous data as one level of categorical data and the NA as another using if_else() and is.na(). ...
I have two dataframes, and want to add values from the 2nd one to the 1st one according to string values, but use partial string matching if there is a space
I'm trying to make the below dotplot in highcharter using R.
I'm able to do it in ggplot (as shown in the figure) and make it interactive using ggplotly() but I can't seem to replicate ...
I have the following data:
1 535234 7528392
2 538091 7533652
3 540850 7549211
4 543208 7561915
5 552494 7579475
6 553310 7571159
I want to transform it from UTM ...