Displaying 20 results from an estimated 400 matches similar to: "R programing help-newton iterations for the square root"
2010 Nov 09
2
Help with Iterator
Dear Experts,
The following is my "Iterator". When I try to write a new function with
itel, I got error.
This is what I have:
> supDist<-function(x,y) return(max(abs(x-y)))
>
> myIterator <- function(xinit,f,data=NULL,eps=1e-6,itmax=5,verbose=FALSE) {
+ xold<-xinit
+ itel<-0
+ repeat {
+ xnew<-f(xold,data)
+ if (verbose) {
+ cat(
+
2009 Jun 06
0
SMACOF joint configuration plot with bread data?
Dear R-helpers,
I have dist class objects for 10 individuals rating the
dissimilarities (on a 100-point scale) of the same 10 faces (analogous
to the bread data). I would like to get an individual differences
scaling jointly for the individual judges and the faces, and plot them
on the same axes.
This is the example:
library(smacof)
data(breakfast)
res.rect<-smacofRect(breakfast,
2007 Nov 06
1
How to find the zero (only the real solution) with the package polynom ?
Hello,
I have 3 columns : a, b and a*b
I would like to find the pair (a,b) so that a*b is the minimum but not from
the points I measured but from the fit of the curve (I have more points that
the ones given below but I fit only on this part because I
know that the minimum a*b is in this interval).
I thought doing it this way :
- to fit a*b=f(a)
abfit<-lm(ab ~ poly(a,8,raw=T))
- to use the
2002 May 10
1
updata.packages()
Something strange is happening with update.packages on my machine (Win2000,
R-1.5.0 installed from binaries). Some of the packages (see below) keep
getting updated every time. When I issue update.packages() I get this
every time for the last few days (I think since I installed 1.5 and the
packages but I am not sure). This happens with CRAN shown below and also
with CRAN set to
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
2000 Aug 31
1
Install polynom pack
Dear R people:
I am trying to download the package polynom to R version 1.0.1.1.
on Windows.
Here are my commands and output:
> install.packages("polynom",lib="c:\rw1011\library",CRAN="http://www.r-project.org/src/contrib/")
Error in start[k]:(start[k + 1] - 1) : NA/NaN argument
In addition: Warning message:
Download had nonzero exit status in:
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
2009 Jun 03
0
fitting polynomial, for integration.
Hello,
I have a question regarding fitting a polynomial to a data set, then
constructing a polynom from the coefficients so that I can integrate it. I
first use lm to fit the polynomial setting the coefficients to raw=TRUE -
this appears to work fine. I plot the model and it is a true
representation of the data.
I then take the coefficients vector and construct a polynom from the
2004 Jun 25
4
Bug in parse(text = <long polynom>) (PR#7022)
Merci beaucoup, Jean,
for the bug report -- which I'm no "completeing" to R-bugs
>>>>> "Jean" == Jean Coursol <coursol@cristal.math.u-psud.fr>
>>>>> on Thu, 24 Jun 2004 15:22:37 +0200 (CEST) writes:
Jean> I was exploring the polynom library with students:
<and found a segmentation fault from parsing a long expression>
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 Mar 25
7
What is web login password for Asteirsk@Home
2010 Oct 14
1
Fw: Problem to create a matrix polynomial
Awaiting some suggestion. Was my question not very understandable? Please let me know how can I offer more elaborate clarification.
Additionally, I would like to solve the determinant of "p1" for the values of "z" (I am working with some multivariate time series modelling). When I use det() function, it am getting error that, that function is not for objects with class
2002 Oct 25
0
Age-period-cohort model
Dear R-list,
I think it's really a newbie question but ...
I try to model age-period-cohort models with polynoms in each effect. I have
for each level of age and period some cases -k- and persons-years -py-.
Models are A_xP_y:
log(k_age,period/py_age,period)=f(polynom(x),age)+f(polynom(y),period). For
exemple I try to adjust an A2P3 :
2007 Nov 07
3
Can I replace NA by 0 (if yes, how) ?
Hello,
I'm trying to fit some points with a 8-degrees polynom (result of lm is
stored in pfit).
In most of the case, it is ok but for some others, some coefficients are
"NA".
I don't really understand the meaning of these "NA".
And the problem is that I can't perform a derivation
(pderiv<-as.function((deriv(polynomial(pfit$coefficients))))) on pfit due to
the
2004 Aug 09
0
returns the value of a polynomial of degree n evaluated a t x.
Try something like:
install.packages("polynom")
library(polynom)
predict(polynomial(rev(p)), x)
HTH,
Andy
> From: McClatchie, Sam (PIRSA-SARDI)
>
> > Background:
> > OS: Linux Mandrake 9.1
> > release: R 1.9.0
> > editor: Xemacs 21.4
> > frontend: ESS 5.1.23
> > ---------------------------------
> >
> > Colleagues
> >
1997 Apr 24
0
R-alpha: polynom add-on
I've packaged Bill's polynom add-on for R (i.e., converted man pages and
took care of TITLE and INDEX). Apart from the missing poly() everything
should be fine ...
The package can be found in the CRAN src/contrib area.
I've also added it to the Debian ix86 r-contrib package.
-k
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel mailing list --
2010 Jan 08
0
solving cubic/quartic equations non-iteratively -- comparisons
Hi,
I'm responding to a post about finding roots of a cubic or quartic equation non-iteratively. One obviously could create functions using the explicit algebraic solutions. One post on the subject noted that the square-roots in those solutions also require iteration, and one post claimed iterative solutions are more accurate than the explicit solutions.
This post, however, is about
2005 Aug 08
2
coefficient of polynomial expansion
Hi,
I would like to get the coefficient of polynomial expansion. For example,
(1+ x)^2 = 1 + 2x + x^2, and the coefficients are 1, 2 and 1.
(1 + x + x^2)^3 = 1 + 3*x + 6*x^2 + 7*x^3 + 6*x^4 + 3*x^5 + x^6, and
the coefficients are 1, 3, 6, 7, 6, 3, and 1.
I know that we can use polynom library. Is there any other way to do
it without loading a library.
Thanks a lot for your help.
Peter
1999 May 03
0
login w/o password
I'm using an old Intel netport printserver that loads it application
code form a netbios resource. As I don't have (or want) a Win station on
my network I thought I can use samba for that issue.
The problem now is that this itel netport tries to login with
user=netport and NO password.
So I set up a ressource like this:
[NETPORT]
comment = Intel Netport RBL file
path =
2006 Nov 13
1
wishlist: xlim in lines.polynomial (PR#9362)
Full_Name: Tamas K Papp
Version: 2.4.0
OS: linux
Submission from: (NULL) (140.180.166.160)
I was using the lines.polynomial method for plotting piecewise polynomials
(parts of splines). I needed a feature to limit the range of plotting using a
parameter given to the function (as opposed to par("usr")). I think that the
following changes would be a nice addition:
lines.polynomial