similar to: Modifying the parameters for a function

Displaying 20 results from an estimated 20000 matches similar to: "Modifying the parameters for a function"

2005 May 17
4
Finding the right number of clusters
SAS has something called the "cubic criterion" cutoff for finding the most appropriate number of clusters. Does R have anything that would replicate that? I've been searching the lists and can't seem to find anything that would point me in the right direction. Thank in advance, Philip Bermingham
2008 Jul 31
2
C versions of serialize/unserialize in packages
Are the functions 'R_Unserialize' and 'R_InitFileInPStream' allowed to be used in R packages? I guess I'm just not clear on the implications of this comment in 'Rinternals.h': /* The connection interface is not yet available to packages. To allow limited use of connection pointers this defines the opaque pointer type. */ I have a function in the
2008 Mar 18
4
cut.Date and cut.POSIXt problem
cut.Date and cut.POSIXt indicate that the breaks argument can be an integer followed by a space followed by "year", etc. but it seems the integer is ignored. For example, I assume that breaks = "3 months" is supposed to cut it into quarters but, in fact, it cuts it into months as if 3 had not been there. > d <- seq(Sys.Date(), length = 12, by = "month") >
2005 May 18
4
standardization
SAS Enterprise Miner recommendeds to standardize using X / STDEV(X) versus [X ? mean(X)] / STDEV(X) Any thoughts on this? Pros Cons Philip
2004 Jun 11
3
Change in grep behavior from 1.9.0 to R-patched
I've noticed a change in the way grep() behaves between the 1.9.0 release and a recent R-patched. On 1.9.0 I get the following output: > x <- dget(file = url("http://www.biostat.jhsph.edu/~rpeng/names.R")) > length(grep("^l\\w+tmean", x, perl = TRUE, value = TRUE)) [1] 84 And on R-patched (2004-06-11) I get > x <- dget(file =
2007 May 04
1
Display list redraw incomplete
Since compiling R 2.5.0 from source on my Mac (PowerBook) I've noticed some strange behavior when plotting. I'm not sure if it's a problem with my setup/compilation because I feel like a problem as basic as this one would have been reported already. I'm running R with X11 and R was built with gcc 4.0.1. Basically, I run > plot(0, 0) > dev.off() X11 4 Warning message:
2004 Nov 11
5
expressions and paste
I have written a function to plot data which will be used for various different chemistries. A simplified version is: plot_data <- function(risk,levels,chem,sd2,measure){ plot(risk, levels,main=paste ("per", sd2, measure, "\n in usual", chem)) } The problem is with the title. This works fine if the variable "chem" is just text, but if it is an expression then
2006 Apr 02
3
speeding up a recursive function
Hi All, is there any general advice about speeding up recursive functions (not mentioning 'don't use them')? Regards, Federico Calboli -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44 (0)20 75943193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t]
2006 Jan 30
2
R on the brain
I was sitting in the coffee room at work listening to people complain about a recent seminar about nanotechnology using the terms nanofluidics, nanofactory, nano-this, and nano-that ... I found myself thinking "well the speaker should just have said with(nano, ...) Un(?)fortunately there's no-one here I can share that thought with. -- 620B Bartram Hall
2004 Apr 16
7
Turning windows screen buffering on and off
All, Does anyone know if there is an option I can set to turn screen-buffered output on and off with the win32 rgui? (Apart from the point and click method). I am running some simulations where it is useful to watch output but it gets mildly tiresome having to manually switch things on and off via the gui. Thanks Toby. > version _ platform i386-pc-mingw32 arch
2004 Apr 03
6
memory limit problem
Could anyone advise me how to allocate 1.5Gbyte memory for R on a Dell laptop running XP professional with 2G memory? I have tried "C:\Program Files\R\rw1081\bin\Rgui.exe" --max-vsize=1400M but I only get only 500MB for R actually. I also tried memory.limit(2^30) in R and got error of: Error in memory.size(size) : cannot decrease memory limit Yi-Xiong
2004 Nov 29
4
"non-visible" functions in return to methods()
Please point me to the documentation explaining why some of the functions returned by calling methods() are marked as "non-visible" and whether there is indeed no way of viewing the R code of such functions thanks Steve _________________________________________________________________
2005 Jan 24
2
using eval() with pre-built expression inside function
I'm trying to evaluate a pre-built expression using eval(), e.g. dataset <- data.frame(y = runif(30, 50,100), x = gl(5, 6)) # one like this mf <- expression(model.frame(y~x)) eval(mf, dataset, parent.frame()) # rather than this eval(expression(model.frame(y~x)), dataset, parent.frame()) In the example above there is no problem, the problem comes when I try to do a similar thing
2004 Nov 12
4
R on 64-bit Linux machine
Hi, We are planning to buy a 64-bit Linux machine which will mainly run R. There was an interesting thread on 64-bits on r-help back in April that basically confirmed that the 64-bit R is fine as long as the length of an atomic object is less than 2^31 - 1. My specific question is on which 64-bit Linux distros (SUSE or RedHat) and processors R is *known* to build out-of-box and run well. Ease
2006 Nov 17
2
Large data Problem
Hi R-Experts, I'm having a problem with reading a large data file which is in .csv format and size is 120 MB (app.). I was trying to use RODBC package but I found RODBCconnectExcel function only. And can I convert this file to .dbf format? How can I read this file? And also let me know if this was a file in .sas7bdat format, what should I do? Thanks in advance.
2006 Mar 30
3
compress defaults for save() and save.image()
I have changed the default in save() to compress = !ascii. This seems quite safe, as almost always save() is called explicitly and people will appreciate that it might take a little time to save large objects (and depending on your system, compression could even be faster). Should we also change the default in save.image()? That is almost always used implicitly, via q(), a menu .... There
2005 Nov 20
1
mapply() gives seg fault (PR#8332)
--KsGdsel6WgEHnImy Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi, people. Wandering in R archives, and seeing the message attached below, I noticed that: mapply(rep,times=1:4, MoreArgs=42) still segfaults on R 2.2.0, and thought I should be a good citizen and report it, even if I do not have an actual problem
2006 Sep 22
2
proj4R library will not install
I'm hoping someone can help me. I have downloaded the proj4R.zip and under my version of R (2.3.1) I install the package from local zip file. This worked great. I then type library(proj4R) to load the library and I get the error: Error in library(proj4R) : 'proj4R' is not a valid package -- installed < 2.0.0? I have read through the install documentation and have downloaded and
2005 Jul 04
2
Windows compile
I'm trying to compile R on Windows 2003 Server and following the instruction laid out in R inst and admin manual I continue to get this error: make: ./Rpwd.exe: Command not found make[1]: ./Rpwd.exe: Command not found /cygdrive/d/rp/tools/bin/make --no-print-directory -C front-ends Rpwd /cygdrive/d/rp/tools/bin/make -C ../../include -f Makefile.win version make[3]: sh.exe: Command not
2007 Apr 13
1
directory/filename completion
I've noticed something recently in R-beta that has changed since R 2.4.1 and I'm not sure if it's a readline problem or an R problem. I am on a Linux FC5 system and in R 2.4.1 I could do load("my-directory/ and then hit TAB and it would list all of the files in 'my-directory', after which I could start typing the beginning of the file, hit TAB again, and it would