R Question - How to generate the 50 first odd numbers and store them as a vector?
Talk Stats » R Programming
by econlearner
10M ago
Hello, This might sound really basic as I am completely new to R. Any help is appreciated ..read more
Visit website
Extract unique items from text
Talk Stats » R Programming
by rho=0
1y ago
Dear TS, I have a column where the same values appear multiple times as a character. I want to create a new column that contains only the unqiue values. Here is an example data frame and the desired output: Code: # Input data df_input <- data.frame(stringsAsFactors=FALSE, id = c(1, 2, 3, 4,5), x = c("1+2+3","1+1","2+2","1+3+3+2+2+3+4","") ) > df_input id x 1 1 1+2+3 2 2 1+1 3 3 2+2 4 4... Extract unique items from text ..read more
Visit website
How to deal with missing values at the end of a time-serie?
Talk Stats » R Programming
by ocadam
1y ago
Hi everyone! I have some problems concerning missing values in time-series data. I have 11 values for each subject, with values being hormone dosage at different time points (0, +40, +50, +55...). Some of these values are missing. I want to impute data and I have to use univariate, non equi-spaced, time-series imputation methods. I tried the "zoo" package, with na.approx() and na.spline() functions. The na.approx() replaces NA by linear interpolation while na.spline() replaces NA by cubic... How to deal with missing values at the end of a time-serie ..read more
Visit website
Found a solution by my own, can be closed
Talk Stats » R Programming
by Tiberian1986
1y ago
Solved ..read more
Visit website
Can be closed, found a solution
Talk Stats » R Programming
by Tiberian1986
1y ago
Solved ..read more
Visit website
Ggplot2 how to display meanbars instead of maximum bar-numbers?
Talk Stats » R Programming
by Tiberian1986
1y ago
Hi We counted the number of ants on two different feeders every 5min over 60min. I would want to show with my graph the amount of ants on a feeder over the whole time + separated into the two feedertypyes. So two bars per timepoint. Usually I always use the following base code for ggplot: p1 <- <- ggplot (data, aes(x = time_after_start, y = AntsOnFeeder))+ scale_y_continuous(expand = c(0, 0)) + geom_point( alpha = 0) + stat_summary(fun.y = "mean", geom = "bar", fill="dodgerblue4") +... ggplot2 how to display meanbars instead of maximum bar-numbers ..read more
Visit website
Time series problems
Talk Stats » R Programming
by noetsi
1y ago
I do Code: mydata <- read_excel(file.choose()) mydata<- ts(mydata$Spend, start = c(2017, 7), frequency = 12) and I have no trouble I do Code: mydatatr<- ts(mydata$Spend, start = c(2017, 7), end = c(2021,9), frequency = 12) and I get Error in mydata$Spend : $ operator is invalid for atomic vectors It is the same data set, this makes no sense ..read more
Visit website
Help for funnel plot
Talk Stats » R Programming
by Beli
1y ago
Hi, Excuse me for this silly questionhow do I get a colour gradient like the one attached. Colours are a bit limited Any specific code for the reference line and pseudo confidence lines. I use "lty", but this do both Here is my argument dat <- escalc("MD", m1i=Mean_TAP, sd1i= SD_TAP, n1i= N_TAP, m2i=Mean_caudal, sd2i= SD_caudal, n2i= N_caudal, slab=Study, data= Duration_of_analgesia) res <- rma(yi, vi, data=dat, measure="MD", method="DL") funnel(res, main="Duration of analegsia", back =... Help for funnel plot ..read more
Visit website
Unused arguments
Talk Stats » R Programming
by Sre999
1y ago
when i create a vector on R console its showing an error like this im unable to get it what are unused arguments and why does it show like that? and how do i rectify the error in the code for creating vector of character elements ..read more
Visit website
Trouble connecting to R
Talk Stats » R Programming
by noetsi
1y ago
My office closed and we now work from home. I connect through a VPN (it is a state computer and there are serious concerns with security). My internet connection, which used to be the state one now turned off, is in practice 60 megs down (in theory 100 but it never is) and 5 up. Things are a bit slower then before, but not much except with R which is incredibly slow now. Any suggestion - I am assuming the VPN does not play nice with R. I am hoping there is some way to fix this. Or make it... Trouble connecting to R ..read more
Visit website

Follow Talk Stats » R Programming on FeedSpot

Continue with Google
Continue with Apple
OR