similar to: nmax parameter in factor function

Displaying 20 results from an estimated 2000 matches similar to: "nmax parameter in factor function"

2017 Jun 04
0
nmax parameter in factor function
Well, you won't like this, but it is kind of wimpily (is that a word?) documented: If you check the code of factor(), you will see that nmax appears as an argument in a call to unique(). ?unique says for nmax, "... see duplicated" . And ?duplicated says: "If nmax is set too small there is liable to be an error: nmax = 1 is silently ignored." So sometimes you get an error
2017 Jun 04
1
nmax parameter in factor function
I'll go just a bit "fer-er." It appears the anomaly -- I hesitate to call it a bug -- is in the C code for duplicated.default(): > duplicated(letters[1:10],nmax=10) [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE > duplicated(letters[1:10],nmax=9) [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE > duplicated(letters[1:10],nmax=8) ## for
2013 Oct 30
1
unique(1:3,nmax=1) freezes R
Dear all, I was playing around with factor contrasts, and found the argument nmax on function factor. When using nmax=1, R froze completely, and I had to close it from task manager. After some debugging, I found that the problem is actually in unique-function, where the internal unique function is called: .Internal(unique(x, incomparables, fromLast, nmax)) More generally, it looks like
2017 Aug 29
1
Print all In new window R 3.4.1 post-installation problems in Mac OSX 10.12.6
Hi, I installed R 3.4.1 on Mac OSX 10.12.6 version. On opening Preferences and trying to change the editor font by clicking the select button I get following error message in R. 2017-08-28 11:57:41.551 R[809:11355] *** RController: caught ObjC exception while processing system events. Update to the latest GUI version and consider reporting this properly (see FAQ) if it persists and is not
2012 Dec 02
6
Warning message: In scan(file, what, nmax...)
Dear R-users, When i try - Data1<-read.table("/Users/kama/Analysis/GDP10.csv",header=TRUE,sep=";") i am getting this error: Warning message: In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : number of items read is not a multiple of the number of columns I wonder what Iam doing wrong. i guess it is something simple, however, i do not understand
2010 Jun 18
3
Use of .Fortran
I have no experience with incorporating Fortran code and am probably doing something pretty stupid. I want to use the following Fortran subroutine (not written by me) in the file SSFcoef.f subroutine SSFcoef(nmax,nu,A,nrowA,ncolA) implicit double precision(a-h,o-z) implicit integer (i-n) integer l,i,nmax double precision nu,A(0:nmax,0:nmax) A(0,0) =
2010 Jun 18
3
Use of .Fortran
I have no experience with incorporating Fortran code and am probably doing something pretty stupid. I want to use the following Fortran subroutine (not written by me) in the file SSFcoef.f subroutine SSFcoef(nmax,nu,A,nrowA,ncolA) implicit double precision(a-h,o-z) implicit integer (i-n) integer l,i,nmax double precision nu,A(0:nmax,0:nmax) A(0,0) =
2012 Nov 12
2
how to enter a string value
hi, I want to know just enter a string value entering a numeric value is make with the function scan () or scan (nmax = ..) but it does not work for string my goal is to enter three string: name and surname and date of birth I try with this code but it shows me errors print ("enter the name") name <- scan (nmax = 1) print ("enter the first name") firstName <- scan
2011 Mar 19
2
problem running a function
Dear people, I'm trying to do some analysis of a data using the models by Royle & Donazio in their fantastic book, particular the following function: http://www.mbr-pwrc.usgs.gov/pubanalysis/roylebook/panel4pt1.fn that applied to my data and in the console is as follows: > `desman.y` <- structure(c(3L,4L,3L,2L,1L), .Names = c("1", "2", "3",
2005 Jun 13
1
memory allocation problem under linux
I have some compiled code that works under winXp but not under linux (kernel 2.6.10-5). I'm also using R 2.1.0 After debugging, I've discovered that in this code: #define NMAX 256 long **box; ... box = (long **)R_alloc(NMAX, sizeof(long *)); //<---HERE THE SIGSEGV for (i=0; i<NMAX; i++) box[i] = (long *) R_alloc(NMAX, sizeof(long)); inside the *first* call to the
2005 Jun 12
1
memory allocation problem under linux
I have some compiled code that works under winXp but not under linux (kernel 2.6.10-5). I'm also using R 2.1.0 After debugging, I've discovered that this code: #define NMAX 256 long **box; ... box = (long **)R_alloc(NMAX, sizeof(long *)); gives a null pointer, so subsequent line: for (i=0; i<NMAX; i++) box[i] = (long *) R_alloc(NMAX, sizeof(long)); gives a SIGSEGV signal.
2011 Nov 10
2
performance of adaptIntegrate vs. integrate
Dear list, [cross-posting from Stack Overflow where this question has remained unanswered for two weeks] I'd like to perform a numerical integration in one dimension, I = int_a^b f(x) dx where the integrand f: x in IR -> f(x) in IR^p is vector-valued. integrate() only allows scalar integrands, thus I would need to call it many (p=200 typically) times, which sounds suboptimal. The
2012 Feb 29
1
Replace back slashes with forward slashes?
Hello, All: What can people tell me about converting back slashes to forward slashes in character strings? Several years ago, Prof. Ripley provided a solution, which I lost and have not been able to find. Below please find a function to do this. I do not find this very satisfactory, however, because it uses "scan" and therefore operates on an input not a
2004 May 01
5
skip lines on a connection
Hi, I am looking for an efficient way of skipping big chunks of lines on a connection (not necessarily at the beginning of the file). One way is to use read lines, e.g. readLines(1e6), but a) this incurs the overhead of construction of the return char vector and b) has a (fairly remote) potential to blow up the memory. Another way would be to use scan(), e.g. scan(con, skip=1e6, nmax=0)
2008 Feb 08
2
Applying lm to data with combn
http://www.nabble.com/file/p15359204/test.data.csv http://www.nabble.com/file/p15359204/test.data.csv test.data.csv Hi, I have used apply to have certian combinations, but when I try to use these combinations I get the error [Error in eval(expr, envir, enclos) : object "X.GDAXI" not found]. being a novice I donot understand that after applying combination to the data I cant access
2006 Apr 26
2
Memory usage and limit
Hello everyone, I recently made a 64-bit build of R-2.2.1 under Solaris 9 using gcc v.3.4.2. The server has 12GB memory, 6 Sparc CPUs and plenty of swap space. I was the only user at the time of the following experiment. I wanted to benchmark R's capability to read large data files and used a data set consisting of 2MM records with 65 variables in each row. All but 2 of the variables are of
2009 Nov 10
3
Error: cannot allocate vector of size...
I'm trying to import a table into R the file is about 700MB. Here's my first try: > DD<-read.table("01uklicsam-20070301.dat",header=TRUE) Error: cannot allocate vector of size 15.6 Mb In addition: Warning messages: 1: In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : Reached total allocation of 1535Mb: see help(memory.size) 2: In scan(file, what,
2012 Jun 10
1
Convert "\" to "/"?
Hello, All: I have for years copied an address like "C:\Program Files\R\R-2.15.0\library\MASS\scripts" from Windows Explorer into R, then manually replaced "\" with "/". I have a function to automate this added to the development version of "sos". However, it generates a warning in "R CMD check" ("parse error: unexpected
2008 Sep 04
1
read.table error
Dear all, I have a tab-delimited text (.txt) file which I'm trying to read into R. This file is of column format - there are in fact 3 columns and 259201 rows (including the column headers). I've been using the following commands, but receive an error each time which prevents the data from being read in: > Jan <- read.table("JanuaryAvBurntArea.txt", header=TRUE) Error in
2008 Jul 30
2
problem with read.table()
Hello R-User I have a table as tab-delimited textfile (291 rows, 83 columns). The first row are labels and the first line the variable names. I used the following code several times with different similar tables and it always worked. But now: setClass("of") setAs("character", "of", function(from) as.ordered(from)) Classe82<-cclasses <-