Displaying 20 results from an estimated 1000 matches similar to: "R-beta: Problems with graphics on postscript"
2001 Jun 02
2
inout() in splancs working properly?
I have a problem with function 'inout()' in package 'splancs' on CRAN-R
Version 1.2.3 under FreeBSD4.3-STABLE.
The following script produces and draws points and a polygon-surrounded
area. Repeating the same script many times shows, that points on the
polygon-line often, but not always, are outside of the polygon-area.
library(splancs)
# dataset with polygon (convex
2009 Oct 09
1
subsetting key on qqmath
Dear R list,
The code below puts qq-plots for two of three groups on the one
plot. However the legend includes all three groups, ie the auto.key
ignores the subset instruction. Is there an easy way to get around
this, so that only those groups plotted are included in the legend?
y1<-rnorm(100); y2<-rnorm(100)+1; y3<-rnorm(100)+2; y<-c(y1,y2,y3)
2011 Jun 03
0
ragged data.frame? using plyr
I have a dataset that looks like:
set.seed(144)
sam<-sample(1000,100)
dat<-data.frame(id=letters[1:10],value=rnorm(1000),day=c(rep(1,100),rep(2,100),rep(3,100),rep(4,100),rep(5,100)))
I want to "normalise" it using the following function (unless you have
a better idea...):
adj.values<-function(dframe){
value_mean<-mean(dframe$value)
value_sd<-sd(dframe$value)
2010 Jul 29
1
Using 'dimname names' in aperm() and apply()
I think that the "dimname names" of tables and arrays could make
aperm() and apply() (and probably some other functions) easier to use.
(dimname names are, for example, created by table() )
The use would be something like:
--
x <-table( from=sample(3,100,rep=T), to=sample(5,100,rep=T))
trans <- x / apply(x,"from",sum)
y <- aperm( trans,
2007 Dec 10
5
Neat conditional assignment
I would like to make a new vector with values taken from two existing
vectors conditional upon a third. At present I am doing this with a for loop
but wonder if there is not a neater way, given some of the very neat things
R can do.
a<-rep(c("A","B"),50)
b<-rep(1,100)
c<-rep(2,100)
a is thus "A" "B" "A" "B" "A"
2000 Dec 08
2
GIS and Spatial stats
[this went to me instead of the list; MM, your list maintainer]
I am digging in the wrong hole I guess. Where can I find R /S routines for
spatial statistics? Also has anyone made an R link to a GIS package? Anyone
out there who works in this area?
Thanks
Richard E. Hoskins
WA State Department of Health
1102 Quince Street
Olympia, WA 98504-7812
richard.hoskins at doh.wa.gov
tel: (360) 236 -
1998 Jun 30
1
No subject
I am trying to make the R-0.62.1 distribution on a DEC alpha running
Digital Unix 3.2d.
I have run into a few problems.....
(1) the Makefile in src/graphics need to have INCLUDES= -I../include
not -I ../include
(2) I have the standard DEC fortran 90 compiler which needs to link R.binary
with a -nofor_main flag. The appropriate slot in config.site appears to be
ignored, which means Makeconf
2007 Oct 08
5
Dice simulation: Getting rep to re-evaluate sample()?
I'm trying to get R to simulate the sum of the values on 10 fair dice
(yes, it's related to a homework problem, but is not the problem
itself). I tried to do this:
> rep(sum(sample(1:6,100,replace=T)), times=10)
[1] 341 341 341 341 341 341 341 341 341 341
and noticed that sum(sample()) seems to be only evaluated once. How can
I overcome this, so that I get a vector of values that
1998 Jun 16
2
62.1 make problems
I'm just trying to install 62.1 under Solaris. Making the program reports no
errors, but when I try to run R I get
ld.so.1: /home/res8/gilp/R-versions/R-0.62.1/bin/R.binary: fatal: libF77.so.2:
can't open file: errno=2
Is there any standard place where I should be looking to find libF77?
When make moves on to building the documents I get the errors below. (Is this
because configure did
2004 Oct 03
3
Making a 'joint distribution'?
Suppose I make two discrete variables --
> D <- data.frame(f1=sample(1:5,100,replace=T), f2=sample(1:5,100,replace=T))
I know I can do:
> table(D$f1, D$f2)
0 1 2 3 4
0 5 5 5 5 4
1 4 2 6 7 3
2 5 3 5 3 6
3 3 1 3 1 2
4 6 4 3 3 6
> table(D$f1)
0 1 2 3 4
24 22 22 10 22
> table(D$f2)
0 1 2 3 4
23 15 22 19 21
which is all great. But how do I produce the
2010 Mar 09
1
ggplot2 rose diagram
Dear R gurus -
consider this plot:
library(ggplot2)
dat <- sample(1:8,100,replace=TRUE)
smp <- ggplot(data.frame(dat), aes(x=factor(dat),fill=factor(dat))) + geom_bar(width=1)
smp + coord_polar()
Q1. How do I change the font size and weight of bar labels (1,2,3...)? I've been wallowing in the 'Themes' structure and I just can't figure out the correct place to change
1998 Jul 02
1
R-beta: 0.62.1 make error on Linux
I get an error trying to make R 0.62.1 on Linux (2.0.30 kernel upgraged
from RH 4.1). I think I saw this mentioned before but haven't been able
find it. Does anyone know the fix?
Paul Gilbert
_____
cd src; make R
make[2]: Entering directory `/hda9/apps2/R-0.62.1/src'
Extracting foreign function symbols
cd graphics; make
make[3]: Entering directory `/hda9/apps2/R-0.62.1/src/graphics'
1998 Oct 14
3
Advice please ...
Hello R-ists
Have been lurking on the list for a while, I have noticed recently two
problems:
1 There seem to be problems with installing R on SuSe Linux
version 5.3. As the list only gets problems and doesn't log the
successes, has anyone successfully loaded R on SuSe 5.3? Is this a
feature of 0.62.3 only or do the problems apply also to earlier versions.
2 There was a list of
2006 Aug 31
6
newbie question about index
Hi,
I am trying to convert a variable a = sample(1:3,100,rep = T) represents choices into a 3X100 dummy varible b with corresponding element set to 1 otherwise 0.
eg.
a: 1 3 2 1 2 3 1 1....
b: 1 0 0 1 0 0 1 1..
0 0 1 0 1 0 0 0...
0 1 0 0 0 1 0 0...
Is there something like b[a] =1 existing? I could not figure this out myself.
---------------------------------
1998 Jun 24
1
rbind(NULL, matrix("a", 5,3))
I'm get the following anti social behavior from R 0.62.1
Paul
_____
R : Copyright 1998, The R Development Core Team
Version 0.62.1 (June 15, 1998)
...
> rbind(NULL, matrix("a", 5,3))
Arithmetic Exception - core dumped
$ $
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
2018 Oct 26
1
Rmpfr: build vector sequentially -- c(.) not working
I've been asked in private,
but am answering in public so others can comment / or find this
answer in the future after a web search.
This is about the package 'Rmpfr' (R interface to MPFR,
the GNU C library for arbitrary precise numbers).
> How can you build a vector of mpfr numbers sequentially?
> Typically I would do something like the following (and try to
> replace the
2006 Feb 16
2
looping through tasks
Hi,
I'm moving (slowly) to R from STATA.
I often have need to move through a set of tasks across a series of years.
In this case, you can see that I'm mimicking -reshape- in STATA, but I'm
less interested in the
task than in programming R.
library(foreign)
mydata<-read.dta("z:\example.dta")
for (y in 2000:2002) {
1998 Jul 01
4
R-beta: R-0.62.1 under Digital Unix
I am grateful for the advice of Douglas Bates on my earlier problem in making
R-0.62.1, but I'm afraid I'm still having problems....
I have been installing the various updates to R for quite some time on my
alpha, and it is only now that I have been having really severe problems.
The three or 4 versions before 0.61.1 installed without error. For 0.61.1 I
needed to install GNU make.
For
2007 Oct 03
2
Speeding up simulation of mean nearest neighbor distances
I've written the function below to simulate the mean 1st through nth
nearest neighbor distances for a random spatial pattern using the
functions nndist() and runifpoint() from spatsat. It works, but runs
relatively slowly - would appreciate suggestions on how to speed up
this function. Thanks. --Dale
library(spatstat)
sim.nth.mdist <- function(nth,nsim) {
D <- matrix(ncol=nth,
2009 Feb 20
2
segfault on amd64 with ffmpeg
Hi,
and thank to you all for this great codec !
I have this bug on Debian Lenny with compiled packages of last svn versions of
ffmpeg and libtheora. This seems to append only on the amd64 arch. Here is a
valgrind log :
pre-barreau at augustins:~/video$ export LD_LIBRARY_PATH=/usr/local/lib
pre-barreau at augustins:~/video$ valgrind
/home/pub/apps/ffmpeg_dev/ffmpeg_svn/ffmpeg -i