Displaying 20 results from an estimated 7000 matches similar to: "symbolic manipulations"
2002 Aug 22
3
Symbolic differentiation ("D","deriv", etc.) (PR#1928)
Full_Name: Lyle W. Konigsberg
Version: 1.5.1
OS: Windows
Submission from: (NULL) (160.36.64.99)
I apparently found an error in how "deriv" puts a derivative to the screen
(though the internal representation is correct). Here's what I was doing for a
class example:
> lnlk<-expression(15*log(p)+11*log(1-p))
> p<-15/26
> D(D(lnlk,"p"),"p")
-15 *
2000 Sep 03
1
removing rows from a dataframe
Hi,
I have a dataframe, hilodata, which looks like this:
> hilodata
sym date maxprice minprice ntick
1 ABK 19910711 11.1867461 0.0000000 108
2 ABK 19910712 11.5298979 11.1867461 111
3 ABK 19910715 11.7357889 11.4612675 52
4 ABK 19910716 11.5298979 11.3240068 51
5
2000 Jan 23
1
size limits
Hi,
I have a few questions about how to handle large data sets in R.
What is the size of the largest matrix that R can comfortably deal with?
Is this size limit imposed by R's software, or is it a question
of the machine that one runs on?
How does one go about choosing reasonable values of vsize
and nsize?
I have a data set with about 1,000,000 rows, and 30
2001 Feb 01
1
constructing a vector from a dataframe and another vector
Hi All,
I have a dataframe, divs, that looks like this:
> divs
date ticker dividend
263 20010322 ADBE 0.025
264 20010628 ADBE 0.025
265 20010927 ADBE 0.025
4308 20010212 ED 0.550
4309 20010514 ED 0.410
5416 20010330 GE 0.137
5417 20010629 GE 0.137
5418 20010928
2017 Sep 19
2
symbolic computing example with Ryacas
Hi all,
I am trying to implement the following matlab code with Ryacas :
syms U x x0 C
d1=diff(U/(1+exp(-(x-x0)/C)),x);
pretty(d1)
d2=diff(U/(1+exp(-(x-x0)/C)),x,2);
pretty(d2)
solx2 = solve(d2 == 0, x, 'Real', true)
pretty(solx2)
slope2=subs(d1,solx2)
I have tried the following :
library(Ryacas)
x <- Sym("x");U <- Sym("U");x0 <-
2017 Sep 19
0
symbolic computing example with Ryacas
Have you studied the "Introduction to Ryacas" vignette that come with the
package?
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Tue, Sep 19, 2017 at 2:37 AM, Vivek Sutradhara <viveksutra at gmail.com>
wrote:
2017 Sep 19
1
symbolic computing example with Ryacas
Thanks for the response. Yes, I did study the vignette but did not
understand it fully. Anyway, I have tried once again now. I am happy to say
that I have got what I wanted.
library(Ryacas)
x <- Sym("x");U <- Sym("U");x0 <- Sym("x0");C <- Sym("C")
my_func <- function(x,U,x0,C) {
return (U/(1+exp(-(x-x0)/C)))}
FirstDeriv <-
2003 Nov 14
3
Expressions and Functions
Dear R People:
When the D function is used for a symbolic derivative,
an expression is returned, which is fine.
How do you change that expression to a function, please?
I've been experimenting with substitute and deparse, but no success
yet.
This is R 1.8.0 for Windows.
thanks in advance for the help!
Sincerely,
Erin Hodgess
mailto: hodgess at gator.uhd.edu
2012 Jan 03
1
higher derivatives using deriv
Dear everyone,
the following is obviously used to compute the nth derivative, which seems
to work
(deriv(sqrt(1 - x^2),x,n))
However, before using this, I wanted to make sure it does what I think it
does
but can't figure it out when reading the ?deriv info or any other
documentation on deriv for that matter:
deriv(expr, namevec, function.arg = NULL, tag = ".expr", hessian = FALSE,
2011 Apr 04
1
Deriving formula with deriv
Dear list,
Hi,
I am trying to get the second derivative of a logistic formula, in R summary
the model is given as :
###
>$nls
>Nonlinear regression model
>model: data ~ logistic(time, A, mu, lambda, addpar)
>data: parent.frame()
> A mu lambda
>0.53243 0.03741 6.94296
###
but I know the formula used is
#
2011 May 27
1
finding derivative of a data series in R
Dear All,
I tried following for getting derivative of a polynomial in R
i<- -10:10
x<-i*i*i+3*i*i+2
fun_spline<-splinefun(i,x)
plot(x,type="l")
lines(x,fx_spline(x, deriv=1), col='green')
lines(x,fx_spline(x, deriv=2), col='green')
Now when I plot
3*i*i + 6*i and 6*i + 6
the plot was not same for first deivative.
where as the 2nd derivative was same
Is this a
2011 Nov 17
3
Obtaining a derivative of nls() SSlogis function
Hello, I am wondering if someone can help me. I have the following function
that I derived using nls() SSlogis. I would like to find its derivative. I
thought I had done this using deriv(), but for some reason this isn't
working out for me.
Here is the function:
asym <- 84.951
xmid <- 66.90742
scal <- -6.3
x.seq <- seq(1, 153,, 153)
nls.fn <- asym/((1+exp((xmid-x.seq)/scal)))
2005 Jul 19
2
Taking the derivative of a quadratic B-spline
Hello,
I have been trying to take the derivative of a quadratic B-spline
obtained by using the COBS library. What I would like to do is
similar to what one can do by using
fit<-smooth.spline(cdf)
xx<-seq(-10,10,.1)
predict(fit, xx, deriv = 1)
The goal is to fit the spline to data that is approximating a
cumulative distribution function (e.g. in my example, cdf is a
2-column matrix with x
2000 Jul 07
1
reorganizing a data frame
Hi,
I have what I think is an easy question.
I have a data frame, called stockdata, of stock prices that looks like this:
date ticker close
1 01/02/1998 GE 24.667
2 01/05/1998 GE 25.104
3 01/06/1998 GE 24.771
4 01/07/1998 GE 24.979
5 01/08/1998 GE 24.750
6 01/02/1998 HIT 71.125
7 01/05/1998 HIT 72.313
2007 Sep 03
2
Derivative of a Function Expression
Hi
I am currently (for pedagogical purposes) writing a simple numerical
analysis library in R. I have come unstuck when writing a simple
Newton-Raphson implementation, that looks like this:
f <- function(x) { 2*cos(x)^2 + 3*sin(x) + 0.5 }
root <- newton(f, tol=0.0001, N=20, a=1)
My issue is calculating the symbolic derivative of f() inside the newton()
function. I cant seem to get R to
2006 Oct 30
1
psigamma derivative
Hello,
I am trying to find a hessian matrix that
involves log(gamma(1/p)) second derivative, p being one of the parameters
of the function. I am using a function "deriv" with the hessian=TRUE
option, but psigamma is not on the list of derivative functions.
I know that it is possible to use 'psigamma(p,deriv)', but it doesn't work
with 1/p. Does anybody can help with this?
2012 Nov 15
1
create function to solve derivative
Readers,
A data set comprises
A B C
10 6 .2
20 7 .4
30 8 .16
40 9 .0256
My requirement is to obtain the derivative for values of A with
respect to B, create a function in R and plot this derivative against
another variable (e.g. values in column C).
Have searched the mailing list and found reference to a function 'D',
but the help accessed via '?D' and '?deriv' does not
2006 Mar 12
2
Numerical Derivatives in R
Hi,
Suppose I have an arbitrary function:
arbfun<-function(x) {...}
Is there a robust implementation of a numerical derivative routine in R
which I can use to take it's derivative ? Something a bit more than
simple division by delta of the difference of evaluating the function at
x and x+delta...
Perhaps there is a way to do this using D or deriv but I could not
figure it out.
2011 Jun 14
1
problems with plots in loop (corrected Email)
Dear helpers,
In an attempt to use a loop to generate graphs in a for loop in run into
a problem. The plan is to fill each page with eight graphs (mfrow =
c(4,2)) in to two columns. Only the buttom graphs ( meaning every fourth
graph) have tick labels on the x axis to preserve space. I used an if
.... Else statement to achieve that.
The problem is that the first eight graphs are skipped
2017 Feb 17
4
Wish List: Extensions to the derivatives table
The derivative table resides in the function D. In S+ that table is extensible because it is written in the S language. R is faster but less flexible, since that table is programmed in C. It would be useful if R provided a mechanism for extending the derivative table, or barring that, provided a broader table. Currently unsupported mathematical functions of one argument include expm1, log1p,