Re: [R] Width of a plotting point (in inches) in grid package

2007-02-13 Thread Randall C Johnson [Contr.]
Hello,
I was thinking that was probably the case. I'm creating a series of graphics
that contain smaller graphics, and was trying to reduce the bounding box as
much as possible with out the plotting points bleeding over to the
surrounding features. I could hard code the size of the bounding boxes (or
use a creative calculation), but that would be tedious, not to mention what
would happen if someone decides they would like to change the plotting point
or it's size. ;) The number of predefined types of points available in a
pointsGrob is handy, but I also like the idea of using circles or
polygons...

I might also add that I've just started using the grid graphics system in
the last few months, and I'm impressed at how powerful and flexible it is.

Thanks!
Randy


On 2/12/07 2:27 PM, Paul Murrell [EMAIL PROTECTED] wrote:

 Hi
 
 
 Randall C Johnson [Contr.] wrote:
 Hello,
 I'm trying to determine the width of a plotting point (in inches) in the
 grid package. I naively thought I could create a pointsGrob with only one
 point and get the width (as tried below), but this results in an object with
 a size of 0inches (changing cex has no effect). Does anyone have a better
 approach? Of course, it would be dependent upon the graphics parameters and
 viewport...
 
 
 The width of a pointsGrob is based on a bounding box surrounding all of
 the (x, y) locations at which the points are located.  It takes no
 notice of the size of the symbol drawn at the locations.  With one
 point, the bounding box has zero size.  The wisdom of this design could
 be debated ...
 
 What do you need the symbol width for?  Could you use a circle,
 rectangle, or polygon instead (all of which calculate their width based
 on the bounding box of the shape that is drawn)?
 
 Paul
 
 
 Thanks,
 Randy
 
 library(grid)
 
 pushViewport(viewport())
 
 convertX(grobWidth(pointsGrob(1, 1)), 'inches')
 [1] 0inches
 
 # I think we're measuring the size of the point here...
 # changing cex has no effect.
 convertX(grobWidth(pointsGrob(1, 1, gp = gpar(cex = 3))), 'inches')
 [1] 0inches
 
 # If I add a second point, the size should increase...
 # how big is the plotting point though???
 convertX(grobWidth(pointsGrob(1:2, 1:2)), 'inches')
 [1] 11.1929133858268inches
 
 sessionInfo()
 R version 2.4.1 (2006-12-18)
 i386-apple-darwin8.8.2
 
 locale:
 C
 
 attached base packages:
 [1] grid  stats graphics  grDevices utils datasets
 [7] methods   base
 
 
 ~~
 Randall C Johnson
 Bioinformatics Analyst
 SAIC-Frederick, Inc (Contractor)
 Laboratory of Genomic Diversity
 NCI-Frederick, P.O. Box B
 Bldg 560, Rm 11-85
 Frederick, MD 21702
 Phone: (301) 846-1304
 Fax: (301) 846-1686
 ~~
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

~~
Randall C Johnson
Bioinformatics Analyst
SAIC-Frederick, Inc (Contractor)
Laboratory of Genomic Diversity
NCI-Frederick, P.O. Box B
Bldg 560, Rm 11-85
Frederick, MD 21702
Phone: (301) 846-1304
Fax: (301) 846-1686
~~

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Width of a plotting point (in inches) in grid package

2007-02-12 Thread Randall C Johnson [Contr.]
Hello,
I'm trying to determine the width of a plotting point (in inches) in the
grid package. I naively thought I could create a pointsGrob with only one
point and get the width (as tried below), but this results in an object with
a size of 0inches (changing cex has no effect). Does anyone have a better
approach? Of course, it would be dependent upon the graphics parameters and
viewport...

Thanks,
Randy

 library(grid)

 pushViewport(viewport())

 convertX(grobWidth(pointsGrob(1, 1)), 'inches')
[1] 0inches

# I think we're measuring the size of the point here...
# changing cex has no effect.
 convertX(grobWidth(pointsGrob(1, 1, gp = gpar(cex = 3))), 'inches')
[1] 0inches

# If I add a second point, the size should increase...
# how big is the plotting point though???
 convertX(grobWidth(pointsGrob(1:2, 1:2)), 'inches')
[1] 11.1929133858268inches

 sessionInfo()
R version 2.4.1 (2006-12-18)
i386-apple-darwin8.8.2

locale:
C

attached base packages:
[1] grid  stats graphics  grDevices utils datasets
[7] methods   base


~~
Randall C Johnson
Bioinformatics Analyst
SAIC-Frederick, Inc (Contractor)
Laboratory of Genomic Diversity
NCI-Frederick, P.O. Box B
Bldg 560, Rm 11-85
Frederick, MD 21702
Phone: (301) 846-1304
Fax: (301) 846-1686
~~

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] snow's makeCluster hanging (using Rmpi)

2006-11-07 Thread Randall C Johnson [Contr.]
Hello everyone,
I've been fiddling around with the snow and Rmpi packages on my new Intel
Mac, and have run into a few problems. When I make a cluster on my machine,
both slaves start up just fine, and everything works as expected. When I try
to make a cluster including another networked machine it hangs. I've
followed the suggestions at
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/83086.html and
http://www.stat.uiowa.edu/~luke/R/cluster/cluster.html but to no avail.
Everything seems to start up fine using lamboot, but then hangs when making
the cluster in R. Making a cluster with 2 slaves seems to work fine, but if
I increase the number (to use the networked machines) it hangs again.

I've tried networking to another Mac, and also to a machine running Red Hat
Linux. Both machines can set up their own local clusters. Does anyone have
any ideas?

Thanks,
Randy

 sessionInfo()
R version 2.4.0 Patched (2006-10-03 r39576)
i386-apple-darwin8.8.2

locale:
C

attached base packages:
[1] methods   stats graphics  grDevices utils datasets
[7] base

other attached packages:
   Rmpisnow 
0.5-3 0.2-2 


~~
Randall C Johnson
Bioinformatics Analyst
SAIC-Frederick, Inc (Contractor)
Laboratory of Genomic Diversity
NCI-Frederick, P.O. Box B
Bldg 560, Rm 11-85
Frederick, MD 21702
Phone: (301) 846-1304
Fax: (301) 846-1686
~~

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] snow's makeCluster hanging (using Rmpi)

2006-11-07 Thread Randall C Johnson [Contr.]

On 11/7/06 11:28 AM, Ramon Diaz-Uriarte [EMAIL PROTECTED] wrote:

 On Tuesday 07 November 2006 15:56, Randall C Johnson [Contr.] wrote:
 Hello everyone,
 I've been fiddling around with the snow and Rmpi packages on my new Intel
 Mac, and have run into a few problems. When I make a cluster on my machine,
 both slaves start up just fine, and everything works as expected. When I
 try to make a cluster including another networked machine it hangs. I've
 followed the suggestions at
 http://finzi.psych.upenn.edu/R/Rhelp02a/archive/83086.html and
 http://www.stat.uiowa.edu/~luke/R/cluster/cluster.html but to no avail.
 Everything seems to start up fine using lamboot, but then hangs when making
 the cluster in R. Making a cluster with 2 slaves seems to work fine, but if
 I increase the number (to use the networked machines) it hangs again.
 
 I've tried networking to another Mac, and also to a machine running Red Hat
 Linux. Both machines can set up their own local clusters. Does anyone have
 any ideas?
 
 Dear Randy,
 
 A few suggestions:
 
 a) make sure there are no firewalls; I assume this is actually the case, but
 anyway;

I don't think I have any firewalls running. I checked and they all seem to
be disabled...
 
 b) what happens if you lamboot outside R (and create a universe with a local
 and a networked machine) and then you do: lamexec -np 6 hostname?

This prints out the host names of each machine as expected.
 
 c) are the Rmpi and snow installed in the same directories in the different
 machines? are there version differences in Rmpi (or Snow) between machines?

I've installed the same versions, but they are in different directories...

I also tried an example per Luke Tierney's suggestion using only Rmpi, and I
get the following error when trying to spawn the Rslaves after starting up
with lamboot (outside of R). I tried to use laminfo, but I'm not sure what
I'm looking for or how to use the information given...

 library(Rmpi)
 mpi.spawn.Rslaves()


It seems that [at least] one of the child processes that was started
by MPI_Comm_spawn* chose a different RPI than the parent MPI
application.  For example, one (of the) child process(es) that
differed from the parent is shown below:

Parent application: MPI_Comm_spawn
Child MPI_COMM_WORLD rank usysv (v7.1.0): 0

All MPI processes must choose the same RPI module and version when
they start.  Check your SSI settings and/or the local environment
variables on each node.

R(26444) malloc: ***  Deallocation of a pointer not malloced: 0x16379a0;
This could be a double free(), or free() called with the middle of an
allocated block; Try setting environment variable MallocHelp to see tools to
help debug
Error in mpi.comm.spawn(slave = system.file(Rslaves.sh, package = Rmpi),
: 
MPI_Error_string: unclassified

 
 
 HTH,
 
 R.
 
 
 
 
 Thanks,
 Randy
 
 sessionInfo()
 
 R version 2.4.0 Patched (2006-10-03 r39576)
 i386-apple-darwin8.8.2
 
 locale:
 C
 
 attached base packages:
 [1] methods   stats graphics  grDevices utils datasets
 [7] base
 
 other attached packages:
Rmpisnow
 0.5-3 0.2-2
 


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] make error for R-2.3.0

2006-05-19 Thread Randall C Johnson [Contr.]
Hello,
I'm trying to install R on a linux machine running Red Hat 8. I ran

./configure
make

and get the following error. I've installed several versions of R (2.2.1
most recently) on this machine and haven't had any problems until now. I
wondered if the outdated compiler (gcc version 3.2) was the problem and
attempted to install my own, more recent version. I tried gcc versions 4.1.0
and 3.4.6, but still have problems. The output below is using gcc 3.4.6 (my
best attempt, but still ending with the same error as gcc 3.2). Any pointers
would be appreciated.

Best,
Randy

system: i686-pc-linux-gnu
gcc version: 3.4.6

everything seems to be fine up to this point:
.
.
.
make[4]: Entering directory
`/home/lgd/rjohnson/bin/R-2.3.0/src/modules/internet'
gcc -I. -I../../../src/include -I../../../src/include -I/usr/local/include
-DHAVE_CONFIG_H  -fpic  -g -O2 -std=gnu99  -c Rsock.c -o Rsock.o
gcc -I. -I../../../src/include -I../../../src/include -I/usr/local/include
-DHAVE_CONFIG_H  -fpic  -g -O2 -std=gnu99  -c internet.c -o internet.o
gcc -I. -I../../../src/include -I../../../src/include -I/usr/local/include
-DHAVE_CONFIG_H  -fpic  -g -O2 -std=gnu99  -c nanoftp.c -o nanoftp.o
gcc -I. -I../../../src/include -I../../../src/include -I/usr/local/include
-DHAVE_CONFIG_H  -fpic  -g -O2 -std=gnu99  -c nanohttp.c -o nanohttp.o
gcc -I. -I../../../src/include -I../../../src/include -I/usr/local/include
-DHAVE_CONFIG_H  -fpic  -g -O2 -std=gnu99  -c sock.c -o sock.o
gcc -I. -I../../../src/include -I../../../src/include -I/usr/local/include
-DHAVE_CONFIG_H  -fpic  -g -O2 -std=gnu99  -c sockconn.c -o sockconn.o
In file included from sockconn.c:34:
sock.h:38: error: syntax error before Sock_read
sock.h:38: warning: type defaults to `int' in declaration of `Sock_read'
sock.h:38: warning: data definition has no type or storage class
sock.h:39: error: syntax error before Sock_write
sock.h:39: warning: type defaults to `int' in declaration of `Sock_write'
sock.h:39: warning: data definition has no type or storage class
make[4]: *** [sockconn.o] Error 1
make[4]: Leaving directory
`/home/lgd/rjohnson/bin/R-2.3.0/src/modules/internet'
make[3]: *** [R] Error 2
make[3]: Leaving directory
`/home/lgd/rjohnson/bin/R-2.3.0/src/modules/internet'
make[2]: *** [R] Error 1
make[2]: Leaving directory `/home/lgd/rjohnson/bin/R-2.3.0/src/modules'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/home/lgd/rjohnson/bin/R-2.3.0/src'
make: *** [R] Error 1




~~
Randall C Johnson
Bioinformatics Analyst
SAIC-Frederick, Inc (Contractor)
Laboratory of Genomic Diversity
NCI-Frederick, P.O. Box B
Bldg 560, Rm 11-85
Frederick, MD 21702
Phone: (301) 846-1304
Fax: (301) 846-1686
~~

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] make error for R-2.3.0

2006-05-19 Thread Randall C Johnson [Contr.]
That's exactly what I needed.

thanks to all!
Randy


On 5/19/06 4:02 PM, Marc Schwartz (via MN) [EMAIL PROTECTED] wrote:

 On Fri, 2006-05-19 at 15:37 -0400, Randall C Johnson [Contr.] wrote:
 Hello,
 I'm trying to install R on a linux machine running Red Hat 8. I ran
 
 ./configure
 make
 
 and get the following error. I've installed several versions of R (2.2.1
 most recently) on this machine and haven't had any problems until now. I
 wondered if the outdated compiler (gcc version 3.2) was the problem and
 attempted to install my own, more recent version. I tried gcc versions 4.1.0
 and 3.4.6, but still have problems. The output below is using gcc 3.4.6 (my
 best attempt, but still ending with the same error as gcc 3.2). Any pointers
 would be appreciated.
 
 Best,
 Randy
 
 SNIP of sock.h related errors
 
 Randy,
 
 This looks like the same issue that was reported on r-devel back at the
 end of April for RH 9.
 
 Download the latest r-patched tarball and you should be OK.  Prof.
 Ripley made some changes to sock.h that should get around these issues.
 Unfortunately, they were not reported until after the release of 2.3.0.
 
 Download from here:
 
   ftp://ftp.stat.math.ethz.ch/Software/R/R-patched.tar.gz
 
 It might be time to consider updating your system, since RH 8.0 is not
 even supported by the Fedora Legacy folks any longer. That means no
 functional or security updates.
 
 Best regards,
 
 Marc Schwartz
 

~~
Randall C Johnson
Bioinformatics Analyst
SAIC-Frederick, Inc (Contractor)
Laboratory of Genomic Diversity
NCI-Frederick, P.O. Box B
Bldg 560, Rm 11-85
Frederick, MD 21702
Phone: (301) 846-1304
Fax: (301) 846-1686
~~

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R and Power Point

2006-02-14 Thread Randall C Johnson [Contr.]
Hello Erin,
Have you tried changing the font to a large, bold face font in the GUI
preferences? This may take care of the resolution issues without needing to
use power point, and give you the flexibility of a live R session.

Best,
Randy

On 2/14/06 1:46 AM, Erin Hodgess [EMAIL PROTECTED] wrote:

 Dear R People:
 
 I'm using R in a time series class.  This class is being
 broadcast live to 2 remote sites via closed circuit TV.
 
 My people at the remote sites are having a terrible time
 seeing the computer screen as it is broadcast(resolution issues).  I have
 decided to put together Power Point slides for the teaching.
 
 I am currently saving the R screen as WMF files and inserting them
 into PowerPoint.  While this works, it seems that there
 might be a simpler method.
 
 Does anyone have any suggestions for the Power Point, please?
 
 Thanks so much!
 R Version 2.2.1 Windows
 Sincerely,
 Erin Hodgess
 Associate Professor
 Department of Computer and Mathematical Sciences
 University of Houston - Downtown
 mailto: [EMAIL PROTECTED]
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 

~~
Randall C Johnson
Bioinformatics Analyst
SAIC-Frederick, Inc (Contractor)
Laboratory of Genomic Diversity
NCI-Frederick, P.O. Box B
Bldg 560, Rm 11-85
Frederick, MD 21702
Phone: (301) 846-1304
Fax: (301) 846-1686
~~

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R Graphs in Powerpoint

2005-11-01 Thread Randall C Johnson {Contr.]
Have you tried using Keynote? It is a part of iWork and handles pdf files
properly (you can resize as many times as you want without loosing image
quality). It also will convert to and from Power Point. I would highly
recommend it to anyone using OS X.

Randy


On 10/31/05 6:14 PM, Jarrett Byrnes [EMAIL PROTECTED] wrote:

 Hey, all.  Quick question.  I'm attempting to use some of the great
 graphs generated in R for an upcoming talk that I'm writing in
 Powerpoint.  Copying and pasting (I'm using OSX) yields graphs that
 look great in Powerpoint - until I resize them.  Then fonts, points,
 and lines all become quite pixelated and blurry.  Even if I size the
 window properly first, and then copy and paste in the graph, when I
 then view the slideshow, the graphs come out pixelated and blurry.
 
 Is there any good solution to this, or is this some fundamental
 incompatibility that I can't get around?
 
 -Jarrett
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 

~~
Randall C Johnson
Bioinformatics Analyst
SAIC-Frederick, Inc (Contractor)
Laboratory of Genomic Diversity
NCI-Frederick
P.O. Box B
1050 Boyles Street
Bldg 560, Rm 11-85
Frederick, MD 21702
Phone: (301) 846-1304
Fax: (301) 846-1686
~~

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html