Displaying 20 results from an estimated 20000 matches similar to: "How to collect the Rtools to build packages"
2003 Dec 22
3
runif and sample with reproducibility
Hello,
I would like to sample a population but the result needs to be
reproducible, using 'runif' or 'sample' is the good way to do it but I
can't manage to make the results reproducible even with the 'set.seed'
function.
My aim is that th call to 'sample(1:100,10)' gives always the same result,
how can I do that?
Thanks!
Eric Esposito
2002 Mar 26
2
compling C code in R for Windows
I have used Splus 3.4 for UNIX and I have a C file that I compiled using
"Splus COMPILE" and later called with dyn.load() and .C(). It works in Splus.
I want to do the same thing in R, as in just use my .s and .c files and
find the equivalent of "Splus COMPILE". I've ran into lots of problems
trying to do this in Windows so far, so please help!
My questions are:
- Do
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 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 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:
2003 Jun 18
4
(no subject)
Hi all,
I'm new to R and am trying to create a dll in order to be able to use the "dyn.load" function with a fortran script. I have a windows OS, have installed perl and the Path is recognized. I have also installed R 1.70 including the src (source code) folder. But when I attempt to create the dll by excecuting "Rcmd SHLIB [-o autologdll] combo.f", in the windows
2008 Mar 20
2
Cygwin and Rtools
I have just got a new machine and had a basic cygwin installed before it
was given to me. It didn't include make. Previously I have installed
Rtools to build packages and now I have got myself a bit confused as to
whether to just install make from the cygwin packages or to install
rtools. I would welcome any advice. I had a look at the rtools section in
the Administration Manual and the
2003 Apr 08
5
Help on smooth.spline?
Hey, R-listers
I was recommended to try using smooth.spline function
for estimating 2-Dimensinal curve given a data set.
So will you please tell me where to get this R function?
Or which package provides this function?
Thanks for your point.
Fred
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 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 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
2003 Nov 26
4
strptime Usage
Hi,
I have a column in a dataframe in the form of:
> as.vector(SLDATX[1:20])
[1] "1/6/1986" "1/17/1986" "2/2/1986" "2/4/1986" "2/4/1986"
[6] "2/21/1986" "3/6/1986" "3/25/1986" "4/6/1986" "4/10/1986"
[11] "4/23/1986" "4/30/1986" "5/8/1986"
2003 Dec 15
3
Julian Dates
Hi,
I'm a bit confused how julian() works. If I understand right, it returns
the number of days since the origin.
I have a vector:
> SLDATX[1:10]
[1] "1986-01-06" "1986-01-17" "1986-02-02" "1986-02-04"
[5] "1986-02-04" "1986-02-21" "1986-03-06" "1986-03-25"
[9] "1986-04-06"
2016 Jun 05
1
flac conversion
On 5 June 2016 at 21:34, Frank Esposito <fpesposito at gmail.com> wrote:
> Hello --
>
> I have a flac file encode 92/24bit -- what tools are available to
> convert these files to wave 44.1/16 bit so then I can convert to
> mp3? Thanks
>
> --
> Frank Esposito
Don't you mean 96/24? Also, which platform (*nix, Mac, Windows)?
Off the top of my head: Audacity,
2003 May 17
2
Regression tree
Hi everybody.
I'm a new R user and i've been searching a tool for construction of
regression tree...
I found function "tree()" written by a certain Mr. Ripley, and seems to be
just
what i'm looking for, but when i try to use it in R replies me:"Object not
found".
So I was wandering if I should include one special library or something
like that?
Thanks a lot,
ana
2003 Mar 26
2
Plotting K-M Curve when have several strata
Hi,
If I have:
foo <- survfit(y ~ x)
where y is a survival object and x is a n-level factor. The documentation
says when I plot(foo), the confidence intervals will not be plotted (which
I guess is understandable as otherwise the plot will get really messy).
I tried to plot with confidence intervals by using:
plot(foo, conf.int = TRUE)
and indeed the resulting plot is messy. However
2003 Mar 26
2
ifelse()
Hi,
I'm not sure if this can be done but..
I know that with ifelse() I can do something like:
ifelse(x <= 3, 1, 2)
to go through each element in my vector x, and if x_i <= 3 substitute the
number with 1 else with 2. Essentially I'll get a vector with 2 levels.
Can I tweak it so I can get 3-levels? For example:
if(x <= 3) then 1
elseif(3 < x <= 4) then 2
2002 Sep 10
9
R 1.6.0 beta
R 1.6.0 has gone into final feature freeze as of today.
As a new feature, we'll make interim beta versions available via
ftp://cran.us.r-project.org/pub/R/src/base
alias
http://cran.us.r-project.org/src/base
(filename R-1.6.0beta_*.tar.gz, where * is the creation date).
If you want to help ensure that the final 1.6.0 works satisfactorily
on *your* platform, it might be a good idea to
2002 Sep 24
4
print(), paste()
Hi,
Suppose I have the following lines at the end of a function:
answer <- c(2, 1, 0, 4, 5) # In fact, answer will be generate in my
# function
print(answer) # Print the answer
# Now, find the best fitted n degree polynomial
print(paste("The best fit is with", which.min(answer) - 1,
"-degree polynomial"))
this will return:
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),