Hello,
Can you tell me what R function to use to do a two-sample chi-squared
test? I want to see if two distributions are significantly different
from each other, and I don't specify the theoretical distribution of
either. For example, I have the following fake count data:
x <- sample(1:10,50,r
Hello,
I'm running R 2.7.2 in a windows XP environment and I run the
following in an R console:
library(ncdf)
nc <-open.ncdf('c:/file.nc')
aa <- get.var.ncdf(nc,'var1')
This works fine, but 'aa' takes up about 100mb and I want to release
the memory after using it. I try:
rm(aa)
close.ncdf(nc)
Hi,
I'm running R 2.7.2 on windows XP. I'd like to find the maximum of a
3-d array over it's third index to create a 2-d array. For example:
> x <- array(c(1,2,3,10,11,12,3:8),c(2,3,2))
> x
, , 1
[,1] [,2] [,3]
[1,]13 11
[2,]2 10 12
, , 2
[,1] [,2] [,3]
[1,]3
Thanks, Duncan. The BACCO package worked.
On Thu, Feb 26, 2009 at 11:22 AM, Duncan Murdoch wrote:
> On 2/26/2009 11:08 AM, eric lee wrote:
>>
>> Hi. I'm trying to run the elliptic package on my computer (windows
>> platform, version 2.7.2). I downloaded the ellipti
n port 80.
I assume it's something on my end because I've been having
connectivity issues here.
Thanks again for your help.
eric
On Thu, Feb 26, 2009 at 11:22 AM, Duncan Murdoch wrote:
> On 2/26/2009 11:08 AM, eric lee wrote:
>>
>> Hi. I'm trying to run the elliptic
Hi. I'm trying to run the elliptic package on my computer (windows
platform, version 2.7.2). I downloaded the elliptic package zip file
from
http://lib.stat.cmu.edu/R/CRAN/
and installed it, but it says that it needs the "emulator" package.
Can you tell me where to download this? The only simi
Hi.
I have two variables, x and y, that are each normally distributed with
mean 0 and have known standard deviations. The variables also have a
known correlation, so I can represent their correlations in a matrix
like so:
a <- array(c(0.3,0.1,0.1,0.2),c(2,2))
a
Is there an R function that gener
Hi. I'm trying to take the difference in days between two times. Can
you point out what's wrong, or suggest a different function? When I
try the following code, The following code works fine:
a <- strptime(1911100807,format="%Y%m%d%H",tz="GMT")
b <- strptime(1911102718,format="%Y%m%d%H",tz="GM
Hi. I'm trying to plot two ecdf's on the same graph using two
different colors. I can plot using the same color, but it doesn't
work when I change colors? Any suggestions? Thanks in advance for
your help.
x <- c(0.80, 0.83, 1.89, 1.04, 1.45, 1.38, 1.91, 1.64, 0.73, 1.46)
y <- c(1.15, 0.88, 0.9
Hi,
I'm trying to get the p-value from the 'lm' regression function as a list
object. For example, I can get r^2 from the following code by entering
summary(fm)$r.squared. Is there a way to get the p-value? If not, is there
a function where I can enter the f-value and degrees of freedom to get
Hi,
I'm trying to use ad.test or ad2.test to test whether a given data set is
exponential. I see that one of the function inputs is "distn", but I try
"exponential" and 5 other variants, but I still get the error message:
ad.test(test2, distn="exponential", fit=list(estimate = 0.167685), H=NA,
s
Hi,
I have data for one dependent variable and multiple independent variables
y = b0 + b1*x1 + b2*x2 + ...
I want to a list of all models that have some subset of the independents
(just x1 x2, and not x3, etc.) and their corresponding BIC values. Is there
a pre-existing function that does this?
Hi. I have a list where each object in the list has multiple parts. I'd
like to take the mean of just one part of each object. Is it possible to do
this with lapply? If not, can you recommend another function? Thanks.
eric
> x1 <- c(0,1,2,3)
> x2 <- c(7,8)
> x3 <- c(2,6,6,8)
> x4 <- c(4,8)
>
Hi,
I'd like to merge the following list and data frame by matching the first
column in the data frame to the first number in each object of the list.
I'd also like the merged object to be a list. Any suggestions? Thanks.
eric
a <- list(c(1,11), c(2,12), c(3,13), c(4,14), c(5,16))
b <- data.f
Hi,
How do I get labels onto the output from tapply? I need the labels to merge
the output with another data frame. Thanks.
eric
d <- data.frame(cbind(x=1:3, y=1:10))
a <- with(d, tapply(y, x, sum))
[[alternative HTML version deleted]]
__
R
Hello,
I'm trying to use tapply to find group means in a function. It works
outside of a function, but I get the error message from the following code:
"Error in tapply(index, cluster, mean) : arguments must have same length."
Any suggestions? Thanks.
eric
d <- data.frame(cbind(cluster=1:2, va
Hello,
I'd like to pass a column name as the argument for a function, but I'm
getting "NULL" as a return value. Any suggestions? Thanks.
> d <- data.frame(cbind(x=1, y=1:10))
> d
x y
1 1 1
2 1 2
3 1 3
4 1 4
5 1 5
6 1 6
7 1 7
8 1 8
9 1 9
10 1 10
> testing <- function(var) {
17 matches
Mail list logo