similar to: Help with Iterator

Displaying 20 results from an estimated 300 matches similar to: "Help with Iterator"

2007 Jul 22
1
Package design, placement of legacy functions
I have a function XOLD() from a nearly verbatim port of legacy FORTRAN in a package. I have remplemented this function as XNEW() using much cleaner native R and built-in functions of R. I have switched the package to the XNEW(), but for historical reasons would like to retain the XOLD() somewhere in the package directory structure. An assertion through a README or other will point to
2010 Dec 07
0
R programing help-newton iterations for the square root
From: jypuppy36@hotmail.com To: r-help-bounces@r-project.org Subject: R programing help-newton iterations for the square root Date: Tue, 7 Dec 2010 12:00:01 -0800 NEWTON ITERATIONS FOR THE SQUARE ROOT Newton iterations to find the root of a real valued function f , i.e. a number x for which f (x) = 0, are of the form Example. To find the square root of a positive number y we can use
2012 Jul 02
0
Fit circle with R
Dear Researchers, I wrote two function to fit a circle using noisy data. 1- the fitCircle() is derived from MATLAB code of * zhak Bucher* from the link http://www.mathworks.com/matlabcentral/fileexchange/5557-circle-fit/content/circfit.m 2- the CircleFitByPratt() from MATLAB code of *Nikolai Chernov *from the link
2005 Dec 29
2
How to fit all points into plot?
Hi, I have a problem when I want to add new points (or a new line) to the graph. Some points (or parts of the line) are not shown on the graph because they lie beyond the scale of the axis. Is there a way to overcome this so all points (or the entire line) are shown on the graph? Here's an example of my problem: colors = c("red", "blue") plot(x=rnorm(100,0,1),
2008 Dec 05
3
Logical inconsistency
Dear colleagues Please could someone kindly explain the following inconsistencies I've discovered when performing logical calculations in R: 8.8 - 7.8 > 1 > TRUE 8.3 - 7.3 > 1 > TRUE Thank you, Emma Jane [[alternative HTML version deleted]]
2002 Oct 25
4
points on a sphere
Not an R question directly, but has anyone got a method for placing a moderately large number of (near) equi-spaced points on a sphere? I have a nasty feeling platonic solids are needed for exact solutions and I'm thinking of samplings involving around 200 - 1000 regularly-spaced points, Thanks, Richard Rowe Richard Rowe Senior Lecturer Department of Zoology and Tropical Ecology, James
2009 Dec 03
1
S4 and head() problems
Hi I am having difficulty defining an S4 method for head() and tail(). I can't quite provide minimal self-contained code because the problem appears to require the whole corpus of my package; and there also appears to be a difference between sourcing the lines directly, and having them installed in a package. The lines in question (I think) are: setClass("mdm",
2010 Nov 10
1
S4 package warning
Hello everyone. R-2.12.0, suse linux 11.3. I am debugging a package that uses S4 methods and R CMD check gives the following warning: > Warning in methods::findMethods(g, env) : > non-generic function 'mdm' given to findMethods() > See the information on DESCRIPTION files in the chapter 'Creating R > packages' of the 'Writing R Extensions' manual. I
2007 Jan 26
2
Using functions within functions (environment problems)
Hi everyone, I've been having difficulty writing wrapper functions for some functions where those same functions include other functions with eval() calls where the environment is specified. A very simple example using function lmer from lme4: lmerWrapper <- function(formula, data, family = gaussian, method = c("REML", "ML", "PQL", "Laplace",
2006 Jan 26
2
Prediction when using orthogonal polynomials in regression
Folks, I'm doing fine with using orthogonal polynomials in a regression context: # We will deal with noisy data from the d.g.p. y = sin(x) + e x <- seq(0, 3.141592654, length.out=20) y <- sin(x) + 0.1*rnorm(10) d <- lm(y ~ poly(x, 4)) plot(x, y, type="l"); lines(x, d$fitted.values, col="blue") # Fits great! all.equal(as.numeric(d$coefficients[1] + m
2001 May 23
1
Passing a string variable to Surv
Hi, I am trying to write a function to automate multiple graph generation. My data looks like: Table of numeric values with the following headers: timeM1 statusM1 xM1 timeM2 statusM2 xM2 timeM3 statusM3 xM3 1 2 3 4 5 6 Where M1,M2, M3 hve no similarity except they have a max string length of 7. Examples are mcw0045, adl0003, lei0101. Now, what I want to do is Function(M1, M2,
2010 Oct 26
1
S4 methods for rbind()
Hello. I am trying to write an S4 method for rbind(). I have a class of objects called 'mdm', and I want to be able to rbind() them to one another. I do not want the method for rbind() to coerce anything to an mdm object. I want rbind(x1,x2,x1,x2) to work as expected [ie rbind() should take any number of arguments]. This is what I have so far: setGeneric(".rbind_pair",
2007 May 28
1
off-topic: affine transformation matrix
This may sound like a very naive question, but... give two lists of coordinate pairs (x,y - Cartesian space) is there any simple way to compute the affine transformation matrix in R. I have a set of data which is offset from where i know it should be. I have coordinates of the current data, and matching coordinates of where the data should be. I need to compute the composition of the affine
2005 Mar 25
7
What is web login password for Asteirsk@Home
2005 Oct 04
3
Problem reading in external data and assigning data.frames within R
Hey there, I apologize if this is an irritatingly simple question ... I'm a new user. I can't understand why R flips the sign of all data values when reading in external text files (tab delimited or csv) with the read.delim or read.csv functions. The signs of data values also seem to be flipped after assigning a new data.frame from within R (xnew <-- edit(data.frame()). What am
2005 Sep 06
2
Predicting responses using ace
Hello everybody, I'm a new user of R and I'm working right now with the ACE function from the acepack library. I Have a question: Is there a way to predict new responses using ACE? What I mean is doing something similar to the following code that uses PPR (Projection Pursuit Regression): library(MASS) x <- runif(20, 0, 1) xnew <- runif(2000, 0, 1) y <- sin(x) a <- ppr(x, y,
2010 Jan 06
1
clues package for cluster selection
Y have only continuos quantitative data and when I trie the function I get next message > res<-clues(C,quiet=TRUE) Error en ChooseK_sil(y, y2 = y, n0, alpha, eps, itmax, second, K2.vec, : el objeto (list) no puede ser coercionado a 'double' Last line would be the object could (list) not be coerced to ´double´ What can be the problem? Yhanks
2010 Nov 18
3
sweep by levels of a factor
Hi, I'd appreciate help with this. I have a data matrix with one column, called f in the example below, a factor. I'd like to subtract the means from each of other columns for each level of the factor. That is, in the example, to go from the first matrix below to the second. I know SWEEP will take out means, but I want to do this for each level of the factor. f x 1 2 1
2002 Jul 22
2
share name size limitation?
Hello everyone, I was trying to rename a newlys created share for a customer site over the weekend. I was trying to give it MedTranBackup but that would only yield an error on the NT4 workstation about the network name not found and could not browse to it via network neighborhood. When I use MedTran everything was happy. I appear to have hit a limit in the length of the name. What is the
2005 Feb 13
2
row equality.
I think that this is an easy one... I have a matrix where each row is an (x,y,z) triplet. Given a potential (xnew,ynew,znew) triplet I want to know if the matrix already contains a row with the new values (the space already has that point). I can do it using a for loop, but I would like to know if there is anyway in which I can do it without the for loop. I do it now like this (this