Displaying 20 results from an estimated 1100 matches similar to: "returns the value of a polynomial of degree n evaluated at x."
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
> >
2004 May 20
2
irregular time series
Background:
OS: Linux Mandrake 9.1
release: R 1.9.0
editor: Xemacs 21.4
frontend: ESS 5.1.23
---------------------------------
Colleagues
I have two time series (upwelling index and water temperature) of evenly
spaced, daily data over 18 months, but the upwelling index series has a gap
of about 2 months right in the middle of it. I want to do the acf, pacf,
ccf, and a cross-spectral analysis
2005 Jan 19
1
looking for a basic spatial diff function
Background:
OS: Linux Mandrake 10.1
release: R 2.0.0
editor: GNU Emacs 21.3.2
front-end: ESS 5.2.3
---------------------------------
Colleagues
Is there a function to calculate distances between adjacent latitude/
longitude pairs in a matrix? It is basically a spatial diff() function that
I have in mind.
Data:
long1, lat1
long2, lat2
long3, lat3
looking for: diff(data$long, data$lat)
2007 Aug 15
1
Polynomial fitting
Hi everybody!
I'm looking some way to do in R a polynomial fit, say like polyfit
function of Octave/MATLAB.
For who don't know, c = polyfit(x,y,m) finds the coefficients of a
polynomial p(x) of degree m that fits the data, p(x[i]) to y[i], in a
least squares sense. The result c is a vector of length m+1 containing
the polynomial coefficients in descending powers:
p(x) = c[1]*x^n +
2007 May 08
1
Piecewise cubic Hermite interpolation
Which function implements the piecewise cubic Hermite interpolation?
I am looking for equivalent of matlab's interp1 with the method = 'pchip'
Here is the reference
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/interp1.html&
--
View this message in context:
2009 Mar 12
3
can I draw 3D plot like this using R?
hi, all
I am looking at R package RGL to draw a colored mesh/surface plot like
this one (from matlab).
http://www.mathworks.com/access/helpdesk/help/techdoc/visualize/cbar.gif
The key features I am looking for is surfaced with grid and color, but
not the terrain-like gradient. but I didn't come even close to it
after browsing through rgl help file.
have anyone drawn something like this
2012 Aug 28
5
return first index for each unique value in a vector
I would like to efficiently find the first index of each unique value in a
very large vector.
For example, if I have a vector
A<-c(9,2,9,5)
I would like to return not only the unique values (2,5,9) but also their
first indices (2,4,1).
I tried using a for loop with which(A==unique(A)[i])[1] to find the first
index of each unique value but it is very slow.
What I am trying to do is easily
2004 Jan 13
1
reinstalling R/ mandrake 9.1/ rpm
OS: linux Mandrake 9.1
R Version 1.8.1 (2003-11-21),
GNU Emacs 21.2.93.1
-------------------
Colleagues
I'm reinstalling R after reformatting a partition containing the
applications software. The urpmi returned this error:
[root at localhost R]# urpmi R-1.8.1-1mdk.i586.rpm
installing R-1.8.1-1mdk.i586.rpm
Preparing...
##################################################
1:R
2011 Mar 30
2
calculating the mode in R...
Dear R users
I?m aware that the package ?modest? is useful to find the mode in an array.
However, I?d like to know if someone has translated the ?mode? function built-in
in MATLAB into R language. This function finds the most frequent value in an
array (http://www.mathworks.com/help/techdoc/ref/mode.html).
Best
Fer
2006 May 19
4
Cross correlation/ bivariate/ mantel
> Background:
> OS: Linux Ubuntu Dapper
> release: R 2.3.0
> editor: GNU Emacs 21.4.1
> front-end: ESS 5.2.3
> -----------------------------
> Colleagues
>
I have two spatial datasets (latitude, longitude, fish eggs) and (latitude, longitude, fish larvae) at the same 280 stations (i.e. 280 cases). I want to determine if the 2 datasets are spatially correlated. In other
2005 Jul 28
2
lattice/ grid.layout/ multiple graphs per page
Background:
OS: Linux Mandrake 10.1
release: R 2.0.0
editor: GNU Emacs 21.3.2
front-end: ESS 5.2.3
---------------------------------
Colleagues
I have a set of lattice plots, and want to plot 4 of them on the page.
I am having trouble with the layout.
grid.newpage()
pushViewport(viewport(layout = grid.layout(2,2)))
pushviewport(viewport(layout.pos.col = 1, layout.pos.row = 1))
working trellis
2005 Aug 15
4
return unique values from date/time class object
Background:
OS: Linux Mandrake 10.1
release: R 2.0.0
editor: GNU Emacs 21.3.2
front-end: ESS 5.2.3
---------------------------------
Colleagues
I have a wind speed time series with a normal frequency distribution and a
spike in the 5 metres/second bin. The most likely explanation is that the
instrument was returning duplicate values at this speed. To check this, I
want to extract all the unique
2005 Mar 14
1
initialising trellis device {lattice}/ postscript
Background:
OS: Linux Mandrake 10.1
release: R 2.0.0
editor: GNU Emacs 21.3.2
front-end: ESS 5.2.3
---------------------------------
Colleagues
I am using:
trellis.device(postscript, file="../figures/name.ps")
.....code to generate the trellis display here ....
graphics.off()
to create a postscript from a working xyplot display.
The problem is that the postscript file appears to be
2005 Sep 13
1
R CMD INSTALL -l /path/to/library packagename
Background:
OS: Linux Mandrake 10.1
release: R 2.1.1
editor: GNU Emacs 21.3.2
front-end: ESS 5.2.3
Colleagues
Since I upgraded to R 2.1.1, I am getting a an error message from R CMD
INSTALL packagename that says
R_HOME ('/usr/local/lib/R') not found.
That's not too surprising, since R is now in /usr/lib/R, but what is
confusing me is that
R CMD INSTALL -l /path/to/library
2006 Jun 30
1
Trellis.par.set/ family/ global change font?
Background:
OS: Linux Ubuntu Dapper 6.06
release: R 2.3.1
editor: GNU Emacs 21.4.1
front-end: ESS 5.2.3
---------------------------------
Colleagues
I have a rather complicated trellis plot that a journal editor has requested I edit and change all the fonts to times.
I'd like to change all fonts globally for the plot, as in par(family="serif") for non-trellis plots. Various
2005 Jun 21
3
R-help
Background:
OS: Linux Mandrake 10.1
release: R 2.0.0
editor: GNU Emacs 21.3.2
front-end: ESS 5.2.3
---------------------------------
Colleagues
Is there a function in R that is an equivalent of zoom in matlab? This is
very useful for being able to magnify details in a plot.
I have searched the help for "zoom", "interactive zooming", and "magnify".
The R search
2006 Mar 29
2
bivariate case in Local Polynomials regression
Hi:
I am using the package "KernSmooth" to do the local polynomial regression. However, it seems the function "locpoly" can only deal with univariate covaraite. I wonder is there any kernel smoothing package in R can deal with bivariate covariates? I also checked the package "lcofit" in which function "lcofit" can indeed deal with bivariate case. The
2011 Aug 09
1
How to pass different arguments to a function within lapply()?
Hi all,
I have a data frame called "rst", see below:
------------------------------------------------------------------------------------------
# This is a paste able example
# In case you don't have "KernSmooth" package installed, please uncomment
below line.
# install.packages("KernSmooth")
library(KernSmooth)
rst <- data.frame(hsp = rnorm(23), dal =
2003 May 18
2
derivatives from loess (not locpoly)?
is there a way of estimating derivative curves, similar to the ones we get from 'locpoly', from 'loess' estimation.
i am interested in estimation of 1st and 2nd derivatives...
---------------------------------
[[alternate HTML version deleted]]
2006 Feb 23
2
locpoly
Dear R Users,
When using locpoly function, number of output values is smaller than the number of input values. How is it possible to get number of output component $y equal to the number of inputs.
Thanks a lot,
Amir
---------------------------------
[[alternative HTML version deleted]]