Re: [Rd] forwarded: bug (?) in cut.POSIXt with breaks=integer

2009-10-16 Thread Ben Bolker

PS a parallel problem seems to occur in cut.Date  ... cut.POSIXt and cut.Date
both allow
breaks to be a single integer specifying the number of breaks, and both call

 if(is.null(labels)) levels(res) - as.character(breaks[-length(breaks)])
  
near the end of the function, which breaks (so to speak) if
length(breaks)!=length(levels(res))-1

I could keep working on a patch if requested, but probably won't otherwise.

  Ben Bolker






-- 
View this message in context: 
http://www.nabble.com/forwarded%3A-bug-%28-%29-in-cut.POSIXt-with-%22breaks%22%3Dinteger-tp25914604p25926126.html
Sent from the R devel mailing list archive at Nabble.com.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Fixing html help port in 2.10

2009-10-16 Thread Dieter Menne

I noted that the new html-help in 2.10 under Windows uses a random port on my
computer.
This cause a problem, because when I create a link such as:

http://127.0.0.1:28027/library/stats/html/addmargins.html

this is for one-time use only. Is it possible to fix the port?

Dieter Menne



-- 
View this message in context: 
http://www.nabble.com/Fixing-html-help-port-in-2.10-tp25926528p25926528.html
Sent from the R devel mailing list archive at Nabble.com.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Question when compiling source code with VC++

2009-10-16 Thread cstrato
Thank you for this clarification, neither did I know that it was written 
by Brian Ripley (although now this seems to be obvious) nor that the 
advice is already 10 years old. Thus please allow me to re-phrase my 
question:


Dear Prof. Ripley:
1, Why did you propose the option /MT instead of option /MD?
2, Will the proposed settings to build the DLL still be valid for the 
upcoming Windows 7?


Best regards
Christian
_._._._._._._._._._._._._._._._._._
C.h.r.i.s.t.i.a.n   S.t.r.a.t.o.w.a
V.i.e.n.n.a   A.u.s.t.r.i.a
e.m.a.i.l:cstrato at aon.at
_._._._._._._._._._._._._._._._._._


Duncan Murdoch wrote:

On 15/10/2009 5:01 PM, cstrato wrote:

Dear Duncan,

In your document readme.packages.txt you have a very helpful 
chapter on Using Visual C++.
Please allow me to ask you one question: Why do you propose the 
option /MT instead of option /MD?
(To my knowledge usually option /MD is used when compiling programs 
with VC++.)


I didn't write that: I've got no experience with VC++.  It was Brian 
Ripley who wrote it, and the log says he wrote it in 1999.  So I'd 
guess that it isn't bad advice (having lasted 10 years without a 
change), but I guess it's possible that it is no longer optimal.


Duncan Murdoch



__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Fixing html help port in 2.10

2009-10-16 Thread Duncan Murdoch

On 10/16/2009 10:39 AM, Dieter Menne wrote:

I noted that the new html-help in 2.10 under Windows uses a random port on my
computer.
This cause a problem, because when I create a link such as:

http://127.0.0.1:28027/library/stats/html/addmargins.html

this is for one-time use only. Is it possible to fix the port?


Not currently.  If you look in tools:::startDynamicHelp you can see how 
it is set up; you could duplicate that setup as a temporary workaround. 
 You might be better off to build R with static help instead.  What is 
the application where you want to be able to give out links?  Perhaps we 
could consult an environment variable or option() to choose the port 
instead of leaving it completely random.


The reason it is random is the worry that multiple R instances on the 
same machine might collide.  All processes on the machine see the same 
ports.


Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Question when compiling source code with VC++

2009-10-16 Thread Simon Urbanek


On Oct 15, 2009, at 17:01 , cstrato wrote:


Dear Duncan,

In your document readme.packages.txt you have a very helpful  
chapter on Using Visual C++.
Please allow me to ask you one question: Why do you propose the  
option /MT instead of option /MD?
(To my knowledge usually option /MD is used when compiling  
programs with VC++.)




Have you read the MS docs? They have different purposes - /MD pulls in  
MSVCR which may not be what you want (depending on your code), /MT  
just says that you want thread-safe libs. The fact that something is  
usually used is not necessarily a very good indicator -- it's better  
if you know what you're doing ;).


Cheers,
Simon

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Fixing html help port in 2.10

2009-10-16 Thread Dieter Menne



Duncan Murdoch-2 wrote:
 
 On 10/16/2009 10:39 AM, Dieter Menne wrote:
 I noted that the new html-help in 2.10 under Windows uses a random port
 on my
 computer.
 This cause a problem, because when I create a link such as:
 
 http://127.0.0.1:28027/library/stats/html/addmargins.html
 
 this is for one-time use only. Is it possible to fix the port?
 
 Not currently.  If you look in tools:::startDynamicHelp you can see how 
 ...
 

Too bad. When I saw the port, I immediately changed all my static links to
use the ports, because it looked like a good idea to have addresses that do
not change when I install into a new directory.

Back to the drawing board. Maybe I should use R_HOME instead.

Dieter


-- 
View this message in context: 
http://www.nabble.com/Fixing-html-help-port-in-2.10-tp25926528p25926875.html
Sent from the R devel mailing list archive at Nabble.com.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Fixing html help port in 2.10

2009-10-16 Thread Simon Urbanek

Dieter,

On Oct 16, 2009, at 11:01 , Dieter Menne wrote:



Duncan Murdoch-2 wrote:


On 10/16/2009 10:39 AM, Dieter Menne wrote:
I noted that the new html-help in 2.10 under Windows uses a random  
port

on my
computer.
This cause a problem, because when I create a link such as:

http://127.0.0.1:28027/library/stats/html/addmargins.html

this is for one-time use only. Is it possible to fix the port?


Not currently.  If you look in tools:::startDynamicHelp you can see  
how

...



Too bad. When I saw the port, I immediately changed all my static  
links to
use the ports, because it looked like a good idea to have addresses  
that do

not change when I install into a new directory.

Back to the drawing board. Maybe I should use R_HOME instead.



You still didn't answer the crucial question -- what are you trying to  
do? If whatever you're building has something to do with R then this  
is no issue since you get the port from R. And if you're working on  
something unrelated to R then nothing prevents you from using the same  
approach that old R versions used -- create a static file that  
points to the correct URL for the current session (like help links in  
2.9 and earlier). But again, unless we know what you're up to we can't  
help you with solutions...


Cheers,
Simon

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Fixing html help port in 2.10

2009-10-16 Thread Dieter Menne




You still didn't answer the crucial question -- what are you trying to  
do? 


Creating some frequently used links in a browser. Static works, but it is
a nuisance that I have to change is every time I get a new version. I now
created a virtual link to it (works in Windows too).

Dieter

-- 
View this message in context: 
http://www.nabble.com/Fixing-html-help-port-in-2.10-tp25926528p25927404.html
Sent from the R devel mailing list archive at Nabble.com.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Question when compiling source code with VC++

2009-10-16 Thread cstrato

Dear Simon,

Of course I have read the MS docs, especially:
http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
which says, that /MT uses the multithread, static version of the 
run-time library.
As far as I understand this is not what most people want since to my 
knowledge most programs seem to use the /MD option.


I also know that option /MT works pretty well for source code of 
R-packages compiled for Windows XP. My second question is if it will 
also work with Windows 7 which I do not have yet.


Furthermore, you may have realized that since some time I am trying to 
find out why in my case neither option works on Vista, see my more 
detailed question at:

https://stat.ethz.ch/pipermail/r-devel/2009-September/054843.html
If you have any idea in this case I would appreciate it very much.

Best regards
Christian


Simon Urbanek wrote:


On Oct 15, 2009, at 17:01 , cstrato wrote:


Dear Duncan,

In your document readme.packages.txt you have a very helpful 
chapter on Using Visual C++.
Please allow me to ask you one question: Why do you propose the 
option /MT instead of option /MD?
(To my knowledge usually option /MD is used when compiling programs 
with VC++.)




Have you read the MS docs? They have different purposes - /MD pulls in 
MSVCR which may not be what you want (depending on your code), /MT 
just says that you want thread-safe libs. The fact that something is 
usually used is not necessarily a very good indicator -- it's better 
if you know what you're doing ;).


Cheers,
Simon




__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Specifying (set of random) port numbers for the help HTML server (Was: Re: Fixing html help port in 2.10)

2009-10-16 Thread Henrik Bengtsson
On Fri, Oct 16, 2009 at 7:54 AM, Duncan Murdoch murd...@stats.uwo.ca wrote:
 On 10/16/2009 10:39 AM, Dieter Menne wrote:

 I noted that the new html-help in 2.10 under Windows uses a random port on
 my
 computer.
 This cause a problem, because when I create a link such as:

 http://127.0.0.1:28027/library/stats/html/addmargins.html

 this is for one-time use only. Is it possible to fix the port?

 Not currently.  If you look in tools:::startDynamicHelp you can see how it
 is set up; you could duplicate that setup as a temporary workaround.  You
 might be better off to build R with static help instead.  What is the
 application where you want to be able to give out links?  Perhaps we could
 consult an environment variable or option() to choose the port instead of
 leaving it completely random.

 The reason it is random is the worry that multiple R instances on the same
 machine might collide.  All processes on the machine see the same ports.

Related:
I'd like to suggest an option/environment variable that specifies the
set of port numbers sampled from, e.g. 6800:6850 or similar.

The reason is that in some places, the user don't have admin
privileges on the computer and most/all ports are blocked from running
servers, and there is a sysadm that needs to approve each port to be
unblocked.  With such a security polices it is possible to have the
smaller set of port number unblocked (but not the full 0-65535 range).
 This applies at least to regular users on Windows.

My $.02

/Henrik


 Duncan Murdoch

 __
 R-devel@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-devel


__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel