Re: [R] how to automatically maximize the graph window (under XP) ?

2008-12-04 Thread pieterprovoost
Hi,

If you have Python running on your system you could create this script 
(graphics.py):

import win32api
import win32con
import win32gui
def windowEnumerationHandler(hwnd, windowlist):
windowlist.append((hwnd, win32gui.GetWindowText(hwnd)))
mywindows = []
win32gui.EnumWindows(windowEnumerationHandler, mywindows)
for hwnd, windowtext in mywindows:
if windowtext.startswith('R Graphics'):
win32gui.ShowWindow(hwnd, win32con.SW_MAXIMIZE)  

Then adds this to your R code:

system(python graphics.py)



--
This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com
http://www.opensubscriber.com/message/r-help@r-project.org/9516326.html

__
R-help@r-project.org 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] maptools no such file

2008-01-27 Thread pieterprovoost
No, I get the same error message there...

--
This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com
http://www.opensubscriber.com/message/r-help@r-project.org/8476734.html

__
R-help@r-project.org 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] curve fitting problem

2007-12-24 Thread pieterprovoost
I'm trying to fit a function y=k*l^(m*x) to some data points, with  reasonable 
starting value estimates (I think). I keep getting singular matrix 'a' in 
solve.

This is the code:

ox - c(-600,-300,-200,1,100,200)
ir - c(1,2.5,4,9,14,20)
model - nls(ir ~ k*l^(m*ox),start=list(k=10,l=3,m=0.004),algorithm=plinear)
summary(model)
plot(ox,ir)
testox - seq(-600,200,length=100)
k - 10
l - 3
m - 0.004
testir - k*l^(m*testox)
lines(testox,testir)

Any thoughts?
Thanks!

--
This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com
http://www.opensubscriber.com/messages/[EMAIL PROTECTED]/topic.html

__
R-help@r-project.org 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] barplot problem

2007-11-20 Thread pieterprovoost
Hello,

I'm trying to find out how I can move the y axis label of a horizontal barplot 
further away from the axis, in order to avoid overlap between the names (which 
I have rotated using las=1) and the label. I have been fiddling with the 
graphical parameters but nothing seems to work. Maybe a graphical 
representation of the graphical parameters would be helpful (cf the CSS box 
model).

Thanks!
Pieter

--
This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com
http://www.opensubscriber.com/messages/[EMAIL PROTECTED]/topic.html

__
R-help@r-project.org 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] barplot problem

2007-11-20 Thread pieterprovoost
Here's an example of my problem:

modelledprofile -  c(7.072289e-01, 2.625354e-01, 2.932886e-02, 8.986474e-04, 
8.155270e-06, 2.537943e-08, 3.137954e-11, 1.729522e-14, 4.579875e-18, 
6.069698e-22, 4.100828e-26, 1.423359e-30, 1.272139e-35, 5.449925e-46, 
1.431925e-57, 1.629660e-70)
depthnames - 
c(0-0.5,0.5-1,1-1.5,1.5-2,2-2.5,2.5-3,3-3.5,3.5-4,4-4.5,4.5-5,5-5.5,5.5-6,6-7,7-8,8-9,9-10)
par(omi=c(0,0.5,0,0))
barplot(rev(modelledprofile),horiz=TRUE,xlim=c(0,1),col=cornflowerblue,names.arg=rev(depthnames),las=1,ylab=depth)

Thanks

--
This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com
http://www.opensubscriber.com/message/r-help@r-project.org/8030546.html

__
R-help@r-project.org 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] barplot problem

2007-11-20 Thread pieterprovoost
Thanks guys, that's exactly what I was looking for!

Pieter

--
This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com
http://www.opensubscriber.com/message/r-help@r-project.org/8030546.html

__
R-help@r-project.org 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.