[R] Error with 'var' in JGR
Bret Collier
bret at tamu.edu
Wed Apr 12 15:07:52 CEST 2006
R-Users,
I had a strange occurrence this AM I could use some help with. 'var' seems to have ceased to work for me when I used JGR 1.3 interface. So, I ran a quick test (following pg 57 of Dalgaard) in both the basic RGui and JGR interface (see below). I have re-installed R 2.2.1 and JGR 1.3 but had no luck so far figuring this out? Anyone have a suggestion? Or did I just make a mistake somewhere (which is more than likely).
Thanks,
Bret
TX A&M
Output from RGui:
> x<-rnorm(50)
> x
[1] -1.016219752 0.940801964 0.168647573 0.328696253 -0.600957761
[6] -0.420394338 -1.140567123 -0.755041336 0.907831188 0.198247025
[11] -0.065116449 0.732841048 -0.400194138 -1.490167845 -1.488611328
[16] 0.311665408 -1.534002497 -1.094357124 -1.717282302 0.217445299
[21] -1.878605987 -0.214200092 -0.096099830 -0.357325121 -0.118191356
[26] -0.214543361 -0.399768989 0.235104678 -0.363194200 -0.275338828
[31] -0.336677033 -0.009178995 1.294139880 1.442454681 1.192023689
[36] -0.521847342 -1.070860356 -0.756584142 0.747503883 0.939960584
[41] -1.444890590 1.218499328 0.343071542 1.303250666 -0.603718755
[46] 0.979527031 -3.709878278 -0.051090815 -0.452191654 -0.206564681
> mean(x)
[1] -0.226039
> sd(x)
[1] 0.9917835
> var(x)
[1] 0.9836345
Output from JGR:
> x<-rnorm(50)
> x
[1] 0.79961648 -0.72223557 -0.10589876
[4] -0.25367834 -0.53518039 0.18296671
[7] 0.33981503 0.29208966 1.15002574
[10] 0.84356083 -0.87841050 0.31345819
[13] 0.61348608 1.13257372 -0.14366714
[16] -1.28563266 1.39519683 -0.85124979
[19] -1.65043342 0.93956978 1.36692691
[22] 0.81240164 -0.44326482 0.20741846
[25] 0.38536713 -0.57994109 1.10457148
[28] -0.99307813 -2.31580515 -1.61582072
[31] 1.63273805 -1.49289425 -1.33675463
[34] -1.17789478 -0.42209334 -0.21208394
[37] -2.21572873 0.35724725 -0.24758106
[40] 0.60470892 1.71646244 1.02161560
[43] 2.93773901 -0.92356017 -0.38588476
[46] -0.08622336 -0.09622387 -0.91419002
[49] 0.93453732 -0.25280526
> mean(x)
[1] -0.02108243
> sd(x)
[1] 1.077132
> var(x)
Error in get(x, envir, mode, inherits) : variable "var" was not found
>version
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 2.1
year 2005
month 12
day 20
svn rev 36812
language R
More information about the R-help
mailing list