Poisson confidence interval in poisson.test similar Here is my data. I observed 3 intervals (for example each 1 month long). In each interval my random variable assumed the following values 10, 15, 12. 
I would like to estimate confidence interval for mean of Poisson random variable. R has function poisson.test takes only vector of length one or two. How do I need to reshape my data to use this test? Or is there another function in R?
 A: A few options:
Fit a Poisson Generalized Linear Model with the Poisson family and only an intercept (this will estimate the mean, but on the log scale):
tmp <- data.frame(y = c(10, 15, 12))
fit <- glm(y ~ 1, data=tmp, family=poisson())
fit
summary(fit)
confint(fit)
exp(confint(fit))

Or use the fact that Poisson values are summable, so pass the sum of your data points to poisson.test with the Time variable set to the number of observations (number of months):
poisson.test(sum(tmp$y), T=nrow(tmp))

Or use maximum likelihood estimation, the mle function in the stats4 package is one option:
library(stats4)
nll <- function(lambda) -sum(stats::dpois(tmp$y, lambda, log=TRUE))
fit2 <- mle(nll, start=list(lambda=5), nobs=nrow(tmp))
(tmp2 <- summary(fit2))
tmp2@coef[1] + c(-2, 2)* tmp2@coef[2] # Wald
confint(fit2) # profiling (likelihood ratio)

There are probably other options as well, but this should get you started.  The methods above all give different but similar intervals, so you should understand what the assumptions and advantages/disadvantages of each are in choosing.
