Displaying 20 results from an estimated 9000 matches similar to: "ts() object"
2002 Apr 15
1
Re: Writting R Function
Hi,
I think I found the problem. It lies in my Fortran program. Is there a
way, after a DO loop, to make sure it does NOT return anything?
Cheers,
Kevin
On Mon, 15 Apr 2002, Ko-Kang Kevin Wang wrote:
> Date: Mon, 15 Apr 2002 17:27:20 +1200 (NZST)
> From: Ko-Kang Kevin Wang <kwan022 at stat1.stat.auckland.ac.nz>
> To: R Help <r-help at stat.math.ethz.ch>
> Subject:
2006 Mar 24
1
who can tell me the reason why it is different on calculating Moran's I using ARCGIS, Geoda and R?
The attachment is my dataset:
1.ccc.shp (the original data)
2.ccc.gwt, which is computed by Geoda;
Introduction to the variables in my data:
ID: key variable;
N_LATITUDE: latitude measured by GPS;
E_LONGITUD: longitude measured by GPS;
LIVES: attribute data
I get the different result of Moran's between ARCGIS and Geoda, R, why?
ARCGIS:spatial statistics tools:spatial
2002 May 06
4
Subtitle?
Hi,
Is it possible to add a subtitle that appears directly below the main
title?
I tried the "sub" parameter, but it adds sub-title to the bottom of the
plot.
Cheers,
Kevin
------------------------------------------------------------------------------
Ko-Kang Kevin Wang
Postgraduate PGDipSci Student
Department of Statistics
University of Auckland
New Zealand
Homepage:
2002 May 10
1
barplot()
Hi,
Is it possible to draw barplot with x-axis being shown? I looked up the
help file and I couldn't seem to find it.
For example, I tried to do
x <- 1:9
p <- log10(1 + 1/x)
barplot(p, xlab = "Digit d", ylab = "Probability",
ylim = c(0, 0.35), axes = F,
main = "Benford's Law Probability")
axis(1, 1:9)
axis(2, seq(0, 0.35, by = 0.05),
2002 May 06
3
Using Object's Name in Function
Hi,
Suppose I have a function:
myfunc <- function(x, y) {
...
}
And within the function I want to print out the name of the x, y
vectors. For example, if I do:
> myfunc(foo, goo)
[1] "foo" "goo"
It shall return "foo", "goo" (with or without quotes is fine), where foo
and goo are two vectors with numbers.
I know this sounds strange, but I'd
2002 Jul 03
0
R Guide for Windows Users
I've just completed(?) an R Guide for Windows users. It was extended from
my "Compile R for Windows" that I put up a few months ago. To get it go
to http://www.stat.auckland.ac.nz/~kwan022/rinfo.php
Here is the table of contents:
1 Introduction
2 Installation
2.1 Installing R Base
2.2 Installing packages
3 Running R
3.1 Rgui
3.2 Rcmd
3.3 Rterm
4 Comile
2002 Jun 08
2
More on for() Loop...
Hi,
Say I want to do something like fitting 10 different sized trees with
rpart() function. The only modification I need to do is to set 10
different cp's, which I have in a vector called foo.
Can I do something like:
for(i in 1:10) {
rpart(y ~ ., cp = foo[i], data = mydata)
}
My problem is, I wish to save the 10 rpart objects into 10 different
names, my.rpart1 ~ my.rpart10, for
2002 Sep 18
2
More on list to data frame (was: Re: List to Data Frame
Hi,
Now suppose I have just one list called FOO, which has 25 objects, e.g.:
[[1]]
1 2 3 4 5
[[2]]
6 7 8 9 10
.
.
.
And I want to do something like:
FRED <- data.frame(cbind(unlist(FOO[[1]]),
unlist(FOO[[2]]),
# ... for all 25 subsets
))
Is it possible to do this, without doing unlist(FOO[[i]]) 25
2008 Nov 04
1
perform Kruskal-Wallis test without using the built-in command in R
Hi,
again i am stuck in my presentation, and i have never learn R before in my
life but need this to be done, so please help me out for a favour:
http://www.nabble.com/file/p20333155/kew.dat kew.dat
run this in R and these comes up:
Month Year Rain
1 Jan 1900 74.400000
2 Feb 1900 80.500000
3 Mar 1900 23.600000
4 Apr 1900 23.600000
5 May 1900 25.100000
6
2002 Apr 09
1
Fortran (77) in R
Hi,
I'm learning Fortran and trying to load a Fortran subroutine into R.
I've done:
R SHLIB Fibonacci.f
and it compiled fine.
Then I went into R and done:
> dyn.load("Fibonacci.so")
> Fib <- function(n) {
+ .Fortran("Fibonacci",
+ as.integer(n))[[1]]
+ }
> Fib(5)
Error in .Fortran("Fibonacci", as.integer(n)) :
2002 Feb 11
2
Time Series ts() Objects
Hi,
Is it possible to create a ts() object, whose data is daily based BUT
measured only on working days?
In other words, suppose I have a data set with 255 observations, measured
from 29 June 1959 to 30 June 1960. How would I create such a data? I
tried something like:
ts(c(...), start(1959, 180))
but I'm not sure what to use for frequency. In other words I don't know
how to
2002 Sep 27
3
xtable()
Hi,
Does anyone know how to manually configure the number of digits printed
out from xtable()?
For example, I'm exporting a data frame through xtable() into a LaTeX
table, I only have two columns in the data frame so by default I only get
two decimal places. But I'd like at least 5 decimal places.
I had a look at ?xtable() but can't seem to find an example.
Cheers,
Kevin
2002 May 18
5
Length of a string
Hi,
Suppose I have created something like this in R:
foo <- "myfoo"
and I want to find out the number of character in foo (in other words, R
should return 5 since "myfoo" has 5 charactors.
How can I do it? I tried:
length(foo)
but it returned 1.
Cheers,
Kevin
------------------------------------------------------------------------------
Ko-Kang Kevin Wang
2002 May 25
2
Ploting in for() loop
Hi,
Suppose I have a for() loop that draws 6 boxplots as follows:
par(mfrow = c(2, 3))
for(i in 2:length(spam.sample)) {
boxplot(split(spam.sample[,i], yesno))
}
Where spam.sample is a data frame with 7 columns, and I'm interested in
plotting column 2 ~ 7 against column 1 (yesno).
The boxplots appeared fine, however I'm trying to add a meaningful title,
x and y labels to them.
2002 Sep 23
4
Overall Title in par(mfrow)
Hi,
Say I did something like:
par(mfrow = c(1, 2))
plot(1:10)
plot(1:10)
and I'd like to have an overall title, i.e. a title that would appear,
centered, on the top of both plots, rather than the top of the last plot.
I tried:
title("FOO", outer = T)
but it doesn't appear right. Half of the FOO is outside the figure region
and can't be seen...
Is there another
2002 Oct 09
1
s.window in stl()
Hi,
This is actually a theory question.
I'm a bit confused by the s.window parameter in the stl() function (which
is in the ts package). For example, in the stl documentation it uses the
nottem data, and then:
plot(stl(nottem, s.win = 4, t.win = 50, t.jump = 1))
What does it mean by s.win = 4? Is it because a year has 4 seasons
(namely Spring, Summer, Autumn and Winter)? If so will it
2002 Aug 17
1
Random Number Testing
Hi,
Is there a package that contains testing algorithms (e.g. runs test,
serial test, autocorrelation test...) for random number generators ?
Cheers,
Kevin
------------------------------------------------------------------------------
Ko-Kang Kevin Wang
Postgraduate PGDipSci Student
Department of Statistics
University of Auckland
New Zealand
Homepage: http://www.stat.auckland.ac.nz/~kwan022
2002 Aug 23
1
List to Data Frame
Hi,
Suppose I have two lists. The first list is called FOO while the second
is called FRED.
Say FOO looks (I've simplifed it) like:
[[1]]
[,1]
[1,] 1
[2,] 2
[[2]]
[,1]
[1,] 3
[2,] 4
while FRED looks like:
[[1]]
[,1]
[1,] 5
[2,] 6
[[2]]
[,1]
[1,] 7
[2,] 8
Can I turn this list into a dataframe which
2002 Aug 27
1
legend() outside plotting region
Hi,
Is it possible to put the legend outside the plotting region?
Say, I have some 24 lines within my plot, which pretty much filled the
plotting region and left me no space (well not enough space) to put in a
legend. So I'd like to put the legend outside the plotting region
(i.e. the region enclosed by the two axis -- I hope I got my terminology
right).
Actually, I did the 24 lines with
2002 Sep 27
1
Subsetting Matrix
Hi,
This is an easy question, however I cannot remember the exact command of
doing it :-(
Say I have a matrix:
> ff
[,1] [,2]
[1,] 0.1000000 116.76987
[2,] 0.6444444 108.26811
[3,] 1.1888889 95.00240
[4,] 1.7333333 112.13647
[5,] 2.2777778 107.39893
[6,] 2.8222222 115.34615
[7,] 3.3666667 97.81029
[8,] 3.9111111 105.35119
[9,] 4.4555556