similar to: Arguments of R- and C-side of internal functions

Displaying 20 results from an estimated 2000 matches similar to: "Arguments of R- and C-side of internal functions"

2004 Jan 21
2
derivative of atan(x) and similar functions
Dear R experts. 'D()' function recognizes some of the analitical functions, such as sin, cos, etc. But I'd like to take analytical derivatives from asin, atan etc. functions. Are there any R packages providing that features? Thanks. -- Timur.
2003 Aug 01
2
'format' problem
Dear R experts, format(12345678, digits = 2) gives [1] "1.2e+07" while format(1234567, digits = 2) gives [1] "1234567" but I'd like the last number to be represented as "1.2e+06" string too. Where am I wrong? Thanks, Timur.
2005 Aug 16
2
Registration with Asterisk server
Dear Asterisk community, sorry if I'm so stupid, but I couldn't register myself with Asterisk. I created the [sip-incoming] context in the sip.conf: [sip-incoming] type = peer username = elzhov port = 5062 ; my kphone listens port 5062 host = 127.0.0.1 Then run Asterisk, and checked peers that are known for Asterisk: *CLI> sip show peers Name/username
2003 Feb 10
1
Zero rows/cols in the hessian matrix
Dear R experts! I try to minimize a function with external C fitting function. I get the hessian matrix. Here it is: [,1] [,2] [,3] [,4] [1,] 1.8816631 0 0.8859803 0 [2,] 0.0000000 0 0.0000000 0 [3,] 0.8859803 0 0.4859983 0 [4,] 0.0000000 0 0.0000000 0 Second and fourth rows/columns have zero values only. That's OK, because that ones related
2003 Nov 12
1
problem with x11 and PS devices on different machines
Dear R help, I run R at home and the work, I have Debian Linux on both machines and the same 'r-base-core' deb packages installed. So I tried to run the same R script, which plots graph in x11 device and then dump it to eps file (x11 and eps you'll find attached). On the home machine there are some stranges in x11 plot as well as in eps file. On the work machine all the ok, despite
2002 Dec 06
2
Fitting 2D vs. 2D data with nls()
Dear R-experts! I have y(x) data, dim(y) == dim(x) == c(2000, 2) I'd like to fit them with nls: fit.result <- nls ( y ~ f(x, p1, p2, p3), start = list(p1 = ... , p2 = .. , p3 = ..) ) Actually I want to fit y[,1] ~ x[,1] and y[,2] ~ x[,2] *simulaneously*, with the same parameters set {p1, p2, p3}. I tried to feed R tha above formula, R errors with:
2008 Nov 19
1
How to look within .Internal ?
In the optim() function there is a syntax : res <- .Internal(optim(par, fn1, gr1, method, con, lower, Here how can I see the inside-codes of ".Internal" function ? Regards, -- View this message in context: http://www.nabble.com/How-to-look-within-.Internal---tp20581897p20581897.html Sent from the R help mailing list archive at Nabble.com.
2004 Mar 15
8
Simple numeric "as.is" question
I am reading a list of numbers from my clipboard, and have been successful, except I can't make a histogram as R doesn't recognize my variable as numeric. I know I need to use "as.is", but the specifics escape me. I have used x<-read.table("clipboard", header=F) to import from a txt file. How do make this numeric? Thanks, J.
2003 Oct 30
2
'nls' and its arguments
Dear R experts! I'd to fit data by 'nls' with me-supplied function 'fcn'. 1) I'd like 'fcn' to accept arbitrary arguments, i.e. I defined it as f(...) {<body>}. (Ok, that's not actually impotant). 2) Second, I would NOT like to supply every parameter in the formula. To illustrate this, let's look at the last example of 'nls' help
2004 Nov 09
4
R code debugging
Dear useRs, it's quite difficult for me to find `Error:'s in my R code, because R does say about error itself, but say nothing about its location, say, string number and file with an error (which may be `source'd from another file). Are there any option for turning of the similar feature, or R can not do such a thing at all? Thanks. -- WBR, Timur.
2004 Feb 03
5
lm coefficients
Dear R experts, Excuse me if my question will be stupid... I'd like to fit data with x^2 polynomial: d <- read.table(file = "Oleg.dat", head = TRUE) d X T 3720.00 4.113 3715.00 4.123 3710.00 4.132 ... out <- lm(T ~ poly(X, 4), data = d) out Call: lm(formula = T ~ poly(X, 2), data = d) Coefficients: (Intercept) poly(X, 2)1 poly(X, 2)2
2004 May 21
2
.First() in R 1.9.0
Dear R experts, I just upgraded R from 1.8.1 to 1.9.0 version. My .First() function in ~/.Rprofile contains x11() and par() functions. .First <- function() { x11(display = "", 8.0, 5.0) par(las = 1, ...) ## ... } And, R claims now, on startup: [hello messages skiped ...] Error in .First() : couldn't find function "x11" > I commented
2005 Jul 22
1
asterisk captures sound device
Hello, dear Asterisk experts. When I run Asterisk (CVS HEAD version), I'm not able to play music anymore -- asterisk seems to capture sound device. Is it not a bug, but a feature? That's unlike stable (1.0.7 and 1.0.9) versions, when I can, say, run an IP telephone on the *same* machine and listen what Asterisk' autoattendant says. Now I can't do that, I need Asterisk and client
2009 Jan 05
1
can't get names of R_env
Hi, I'm quite knew in R, so I might not have the R specific jargon. But here is my problem, I'm trying to access and use variabels given by a function environment, more specifically the rho in do_optim in src/main/optim.c According to the documentation http://cran.r-project.org/doc/manuals/R-ints.html#The-_0027data_0027 the envsxp is defined as a tagged pairlist. "ENVSXP: Pointers
2014 Jul 07
2
a question about optim.R and optim.c in R
Hi, I am learning R by reading R source code. Here is one question I have about the optim function in R. The context : In the optim.R, after all the prep steps, the main function call call is made via : .External2(C_optim, par, fn1, gr1, method, con, lower, upper). So, it seems to me, to follow what is going on from here, that I should read the optim function in \src\library\stats\src\optim.c
2020 Oct 28
2
R optim() function
Hi R-Help, I am using R to do functional outlier detection (using PCA to reduce to 2 dimensions - the functional boxplot methodology used in the Rainbow package), and using Hscv.diag function to calculate the bandwidth matrix where this line of code is run: result <- optim(diag(Hstart), scv.mat.temp, method = "Nelder-Mead", control = list(trace = as.numeric(verbose))) Within the
2009 Jun 18
1
ogg_stream_reset() question
Hi Ogg experts! My current work is catenating packets from several ogg files to the one long stream, so I'd like to create stream once, and then reset it just before reading codec headers from every new file. However, after calling ogg_stream_reset_serialno(ogg_stream_state *os, int serialno), bos page is not pushed in stream since it calls ogg_stream_reset(ogg_stream_state *os), which
2002 Dec 20
1
GetRNGstate() crashes with 'Segmentation fault'
Dear R-masters, I tried to compile this simpel C-code: //----------------- #include<R.h> int main() { GetRNGstate(); return 0; } //----------------- Compiling: ~> gcc -o a a.c -I/usr/lib/R/include/ -L/usr/lib/R/bin/ -lR ~> ldd a libR.so => /usr/lib/libR.so (0x40018000) libc.so.6 => /lib/libc.so.6 (0x401a8000) libblas.so.2 =>
2003 Jan 13
1
Evaluating expressions from within C code
Dear R experts! I want to evaluate expressions from within C code. For instance, I want this code: /* ============ -- C code -- ============== */ #include <R.h> #include <Rinternals.h> SEXP foo(SEXP expr, SEXP rho) { SEXP x; PROTECT(x = allocVector(REALSXP, 1)); REAL(x)[0] = 1; UNPROTECT(1); return
2003 Feb 25
1
Error analysis
Dear R experts, I fitted data (length == m) with an external library (that's a non-linear problem), and, I've got the final parameter vector (length == n) and Jacobian matrix (dim == c(m, n)). Now, I want to analyse the standard errors of the parameters correctly. How can I do it? Where can I read about it else? Thanks! -- WBR, Timur.