R-beta: R-0.62.1 under Digital Unix

Mark A. Beaumont M.Beaumont at ucl.ac.uk
Thu Jul 2 12:23:27 CEST 1998


Peter Dalgaard wrote:

>"Mark A. Beaumont" <M.Beaumont at ucl.ac.uk> writes:
>
>
>> The problem is with paste:
>> paste("the cat","sat on the mat")
>> Error, memory exhausted
>
>
>Ok. Let's first verify that the problem really is in paste: Try
>temporarily removing the expression that contains it from RProfile.
>

I have replaced the offending paste line in Rprofile with an assignment
to the appropriate string.

I then get the first prompt without a "memory exhausted" error, so it does
look as though this use of paste was causing the initial problem.

>Next, let's first see if paste itself looks sane:
>
>> paste
>function (..., sep = " ", collapse = NULL)
>{
>            args <- list(...)
>            if (is.null(args))
>                    ""
>            else {
>                    for (i in 1:length(args)) args[[i]] <-
>as.character(args[[i]])
>                    .Internal(paste(args, sep, collapse))
>            }
>}
>

it looks fine

>if it does (well, except for the fact that the for loop could have
>been an lapply() call...), then try
>
>debug(paste)
>paste("the cat","sat on the mat")

This produces

	> debug(paste)
	> paste("the cat","sat on the mat")
	debugging in: paste("the cat", "sat on the mat")
	debug: args <- list(...)
	Browse[1]>
	debug: if (is.null(args)) "" else {
            	for (i in 1:length(args)) args[[i]] <- as.character(args[[i]])
            	.Internal(paste(args, sep, collapse))
	}
	Browse[1]>
	debug: for (i in 1:length(args)) args[[i]] <- as.character(args[[i]])
	Browse[1]>
	Error: memory exhausted

Following on from Albrecht Gephardt's message, I find
1:3 gives "error: memory exhausted", similarly with seq(1,5).

Thus, it would appear that the problem lies somewhere in here. Though why
it should manifest itself in two different ways on our two systems is
rather mysterious. Could there be an obscure long/int problem somewhere?
People tend to forget that they have different lengths on an alpha.


>
>> There are no .RData and .Rprofile files in the directory I have been using.
>
>And no .Rprofile in your home dir either, I take it?

Thats right.


All the best,
Mark

Mark A. Beaumont
Institute of Zoology
Zoological Society of London
Regent's Park
London NW1 4RY UK
Tel:  0171 449 6617
Fax: 0171 586 2870
m.beaumont at ucl.ac.uk


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list