Skip to content

R-1.9.0: make error on slackware-current!

6 messages · Timothy Tatar, Randy Zelick, Brian Ripley

#
It appears that the #If NeedFunctionPrototypes compiler directive has been
removed from Xlib.h and Xutil.h in Xfree86 4.4. All the prototypes
containing the offending _Xconst are now being processed. R 1.8.1, which
built successfully under XFree86 4.3, fails under XFree86 4.4 with the same
error messages.
#
On Sun, 18 Apr 2004, Timothy Tatar wrote:

            
Yes, we do know.  However, 1.9.0 _has_ been built against XFree 4.4, and
also XFree 8.3 with NeedFunctionPrototypes defined to be 1.  _Xconst 
should be defined, so the problem seems to be with `slackware-current' 
(whatever that is) rather than XFree 4.4.  Does adding

#ifndef _Xconst
#define _Xconst const
#endif /* _Xconst */

help?  (That's inside #if NeedFunctionPrototypes in the headers I have.)
1 day later
#
I have been able to reproduce this.  It appears that _some_ XFree 4.4.0 
Linux installations need 

#include <stdio.h>

so please add that before the X11/X.h call in src/modules/X11/dataentry.c

It seems nothing to do with _Xconst.
On Sun, 18 Apr 2004, Prof Brian Ripley wrote:

            

  
    
#
Sorry, a time skew caused a problem here:

removing the line 

#define NeedFunctionPrototypes 0

is also needed.
On Mon, 19 Apr 2004, Prof Brian Ripley wrote:

            

  
    
#
Hello all,

Relative to WinXP & R1.8....

I have two histograms to plot, and for comparison purposes I want them to
have the same Y-scaling. I tried to find the size of the bin with the
maximum count before generating the histogram, but this did not work (see
below). What is a better way?

par(mfrow=c(2,1)) # set up for plotting in 2 rows and 1 column

x1<-seq(-0.5,58.5,1) # make a range of x values for histogram

I thought the following lines would allow me to capture the results of the
hist function and determine the max bin count for scaling *before* making
the plot, but R cleverly saw around my method and plots it anyway. With
this code I get two plots.

q=hist(mt1,x1)       # stick results in a variable... alas also plots
cts=q$counts         # get the bin counts
mct1=max(cts)        # how many values in the bin with the most values
hist(mt1,x1)         # generate histogram plot

# go on with histogram #2...


Thanks,

=Randy=

R. Zelick				email: zelickr at pdx.edu
Department of Biology			voice: 503-725-3086
Portland State University		fax:   503-725-3888

mailing:
P.O. Box 751
Portland, OR 97207

shipping:
1719 SW 10th Ave, Room 246
Portland, OR 97201
#
?hist reveals argument plot=TRUE, so try plot=FALSE.
On Mon, 19 Apr 2004, Randy Zelick wrote:

            
No such thing.  There is R 1.8.0 and R 1.8.1 but not R 1.8.
Something like
q1 <- hist(mt1, x1, plot = FALSE)
q2 <- hist(mt2, x2, plot = FALSE)
mctl <- max(q1$counts, q2$counts)
plot(q1, ylim=c(0, mctl))
plot(q2,  ylim=c(0, mctl))