Displaying 20 results from an estimated 9000 matches similar to: "columnames changes behaviour of formula"
2006 Jul 19
2
Stirling numbers
Hi
anyone coded up Stirling numbers in R?
[I need unsigned Stirling numbers of the first kind]
cheers
Robin
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2011 Sep 27
1
array extraction
hello everyone.
Look at the following R idiom:
a <- array(1:30,c(3,5,2))
M <- (matrix(1:15,c(3,5)) %% 4) < 2
a[M,] <- 0
Now, I think that "a[M,]" has an unambiguous meaning (to a human).
However, the last line doesn't work as desired, but I expected it
to...and it recently took me an indecent amount of time to debug an
analogous case. Just to be explicit, I would
2002 Nov 26
5
unexpected behaviour of rnorm()
Hello everyone.
If I do
f <- function(n){max(rnorm(n))}
plot(sapply(rep(5000,4000),f)) #[this takes my PC about 30 seconds]
then I get something quite unexpected: gaps in the distribution. For
me, the most noticable one is at about 3.6.
Do others get this? Is it an optical illusion? It can't be right,
can it? Or maybe I just don't understand the good ol' Gaussian very
2001 Oct 18
1
tapply problem
Hello everybody.
I have a question that has stumped me and the usual "apply" tricks
don't seem to work. I run a course where each student's performance
is marked by one or more assessors.
I have a data frame containing students' names, assessors' names and
their marks, arranged as follows:
ID student assessor Q1A Q1B Q1C Q2A Q2B Q3
1 2152833
2006 Apr 06
1
R CMD check for packages in a bundle
Hi
[MacOsX 10.4.6; R-2.2.1]
I have a bundle that comprises three packages. I want to run R CMD
check on
each one individually, as it takes a long time to run on all three.
I am
having problems.
The bundle as a whole passes R CMD check, but fails when I cd to the
bundle
directory and run R CMD check on a package directory.
The whole bundle passes:
octopus:~/scratch% R CMD check
2019 Mar 01
1
pcre problems
Still something wrong. I've uncommented the deb-src lines in
sources.list as you suggested (and I thought it couldn't hurt to try
--allow-unauthenticated as well) and:
root at limpet:/etc/apt# apt-get update --allow-unauthenticated
Hit:1 http://nz.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://repo.steampowered.com/steam precise InRelease
Hit:3
2019 Mar 01
1
pcre problems
On 3/1/19 9:03 AM, robin hankin wrote:
> OK thanks Tomas, but I get
>
>
> OK~ sudo apt-get build-dep r-base
> Reading package lists... Done
> E: Unable to find a source package for r-base
> OK~
It seems you need to enable source code? repositories on your system
(and then run apt-get update).
You can enable them in /etc/apt/sources.list, uncomment all lines
starting with
2019 Mar 01
1
[Rd] pcre problems
On 3/1/19 9:03 AM, robin hankin wrote:
> OK thanks Tomas, but I get
>
>
> OK~ sudo apt-get build-dep r-base
> Reading package lists... Done
> E: Unable to find a source package for r-base
> OK~
It seems you need to enable source code? repositories on your system
(and then run apt-get update).
You can enable them in /etc/apt/sources.list, uncomment all lines
starting with
2003 May 02
3
letters to numbers conversion
Hello List
How do I turn
R> simple.example.alphabetic
[,1] [,2] [,3]
[1,] "a" "b" "c"
[2,] "d" "e" "f"
[3,] "g" "h" "i"
into
R> simple.example.numeric
[,1] [,2] [,3]
[1,] 1 2 3
[2,] 4 5 6
[3,] 7 8 9
[ie "a" becomes 1, ..., "z"
2019 Mar 01
1
[Rd] pcre problems
Dear Robin and Tomas,
By changing the CC, I'm hereby trying to move this to
R-SIG-Debian (Ubuntu a flavor of Debian) where it belongs ...
Martin
>>>>> robin hankin
>>>>> on Fri, 1 Mar 2019 21:43:07 +1300 writes:
> Still something wrong. I've uncommented the deb-src lines in
> sources.list as you suggested (and I thought it
2002 Jun 13
2
fisher.test FEXACT memory bug "should not occur" (PR#1662)
This is a bad bug as reported by Robin Hankin,
it is still in "R-patched" ...
##- From: Robin Hankin <r.hankin@auckland.ac.nz>
##- To: r-help@stat.math.ethz.ch
##- Subject: [R] possum sleeping: thanks and fisher.test() FEXACT error
##- Date: Thu, 13 Jun 2002 16:46:26 +1200
## .....
## Example slighlty modified (MM)
d4 <- matrix(c(0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 0, 0,
2019 Mar 01
2
pcre problems
OK thanks Tomas, but I get
OK~ sudo apt-get build-dep r-base
Reading package lists... Done
E: Unable to find a source package for r-base
OK~
hankin.robin at gmail.com
On Fri, Mar 1, 2019 at 8:47 PM Tomas Kalibera <tomas.kalibera at gmail.com> wrote:
>
> On 3/1/19 7:10 AM, robin hankin wrote:
> > thanks for this guys.
> >
> > I only compiled pcre myself as a last
2019 Mar 01
2
pcre problems
OK thanks Tomas, but I get
OK~ sudo apt-get build-dep r-base
Reading package lists... Done
E: Unable to find a source package for r-base
OK~
hankin.robin at gmail.com
On Fri, Mar 1, 2019 at 8:47 PM Tomas Kalibera <tomas.kalibera at gmail.com> wrote:
>
> On 3/1/19 7:10 AM, robin hankin wrote:
> > thanks for this guys.
> >
> > I only compiled pcre myself as a last
2010 Nov 10
1
S4 package warning
Hello everyone. R-2.12.0, suse linux 11.3.
I am debugging a package that uses S4 methods
and R CMD check gives the following warning:
> Warning in methods::findMethods(g, env) :
> non-generic function 'mdm' given to findMethods()
> See the information on DESCRIPTION files in the chapter 'Creating R
> packages' of the 'Writing R Extensions' manual.
I
2003 Jun 23
3
right assignment ("->") and functions
Hi everyone
check this out [R-1.7.0]:
R> f1 <- function(x){x^2}
R> f1 -> f2
R> f2(4)
[1] 16
R>
R> function(x){x^2} -> f3
function(x){x^2} -> f3
R> f3(4)
Error: couldn't find function "f3"
Why does right assignment "->" work in the first but not the second
case? Can anyone else reproduce this?
--
Robin Hankin, Lecturer,
School of
2003 May 29
2
R CMD BATCH --vanilla --slave produces unwanted lines
Hello list
(thanks for all the help on my data.frame() question, especially to
Professor R for a working script...I was pleased to see the solution
wasn't obvious!)
Anyway, now I'm trying to run R in batch mode, but I'm getting extra
output, which I don't want (RedHat 8.3, R-1.7.0):
r:~% cat test.R
options(echo=FALSE)
write(rnorm(4),"")
r:~% R CMD BATCH --vanilla
2002 Dec 12
2
width and length arguments to postscript()
Hi everyone
This must be a FAQ but I can't find it anywhere...
I want a postscript image of a contour() plot, with axes of equal
length. Try
R> postscript(file="~/f.ps")
R> contour(matrix(rnorm(100),10,10))
R> dev.off()
This isn't what I want: the plotting region is, as documented, quarter
of an inch shy of the paper edge and the axes appear to be different
lengths.
2002 Sep 22
3
binom.test()
Hello everybody.
Does anyone else find the last test in the following sequence odd?
Can anyone else reproduce it or is it just me?
> binom.test(100,200,0.13)$p.value
[1] 2.357325e-36
> binom.test(100,200,0.013)$p.value
[1] 6.146546e-131
> binom.test(100,200,0.0013)$p.value
[1] 1.973702e-230
> binom.test(100,200,0.00013)$p.value
[1] 0.9743334
(R 1.5.1, Linux RedHat 7.1)
--
2003 Mar 06
3
multiple plots and postscript()
Kia Ora everybody.
There must be an obvious answer to this, but I can't see it....
I want four square plots in one postscript file. The canonical answer
would be:
postscript(file="~/f.ps",width=5,height=5)
par(pty="s",mfrow=c(2,2))
plot(1:19,xlab="")
plot(1:19,xlab="")
plot(1:19,xlab="")
plot(1:19,xlab="")
dev.off()
But this
2003 Feb 13
6
generic handling of NA and NaN and NULL
Hello everybody
I have a generic problem which the following toy function illustrates:
f <- function(n) {
if(abs(n) < pi) {
return(TRUE)
} else {
return(FALSE)
}
}
I want it to return TRUE if abs(n)<pi and FALSE otherwise. f() is
fine as far as it goes, but does not deal well with NA or NaN or NULL
(I want these to signal some problem with the