similar to: Foreign function call

Displaying 20 results from an estimated 10000 matches similar to: "Foreign function call"

2009 Mar 04
2
modifying a built in function from the stats package (fixing arima)
Dear Carlos and Kjetil, Thanks for your answer. >I do not think that is the way to go. If you believe that your algorithm >is better than the existing one, talk to the author of the package and >discuss the improvement. The whole community will benefit. I should be able to *easily* modify it and test it first! >Copy the existing function into a new file, edit it and load it via
2009 Mar 05
2
modifying a built in function from the stats package (fixing arima)
>If you ***look at the code*** for arima you will see that ``%+%'' is >defined >in terms of a call to ``.Call()'' which calls ``R_TSconv''. So >apparently >R_TSconv is a C or Fortran function or subroutine in a ``shared >object library'' >or dll upon which arima depends. Hence to do anything with it you'll >need to get >that shared
2009 Mar 03
2
modifying a built in function from the stats package (fixing arima)
Dear members of the list, I'm a beginner in R and I'm having some trouble with: "Error in optim(init[mask], armafn, method = "BFGS", hessian = TRUE, control = optim.control, : non-finite finite-difference value [8]" when running "arima". I've seen that some people have come accross the same problem:
2009 Aug 24
1
Help in building new function
Hi: I''ve installed the precompiled binary for Windows. I need to use an existing function, but I want to introduce some slight changes to it. 1. Is there a way for me to find the source files through windows explorer? I know I can see it using edit(object name) but I want to know if I can see it via explorer in some location under the R directory. 2. I donĀ“t want to modify the code of
2008 Sep 01
2
Help with stl
I just realized after some tips and a little digging that what I was trying to do "manually" has already been done. I was trying to fit my data using 'lm' then taking the "residual" data and trying to do a spectral estimate (for seasonality) usiing fft and then passing the "residual" of all of that to arima to get the irregular portion of the time series
2008 Sep 26
1
auto.arima help
I am calling auto.arima with a time series that is about 186 observations long with a frequency of 52. With some time series I get: 1:last.nonzero: result would be too long a vector Is there something that I can do to the data to avoid this error? Thank you. Kevin
2009 Feb 19
1
Arima bug?
I was looking at the 'R' code associated with arima. I see the following: upARIMA <- function(mod, phi, theta) { p <- length(phi) q <- length(theta) mod$phi <- phi mod$theta <- theta r <- max(p, q + 1) if (p > 0) mod$T[1:p, 1] <- phi if (r > 1) mod$Pn[1:r, 1:r] <-
2008 Apr 09
1
getNativeSymbolInfo fails with Fortran symbol.
In the following code routine 'initaquaphy' is defined in Fortran, and dynamically loaded into R.: test.f: subroutine initaquaphy(odeparms) external odeparms double precision pars(19) common /myparms/pars call odeparms(19, pars) return end $ R CMD SHLIB Aquaphy.f gfortran -fpic -g -O2 -c test.f -o test.o gcc -std=gnu99 -shared
2009 Oct 27
3
Non-normal residuals.
Hello, I asked a question about what the most likely process to follow if after a time-series fit is performed the residuals are found to be non-normal. One peron responded and offered to help if I supplied a sample data set. Unfortunately now that I have a sample I have lost the emai addressl. If you are that person or have some ideas please email me back at rkevinburton at charter.net. Thank
2011 Oct 22
7
"Plotting" text?
I noticed that the text() command adds text to a plot. Is there a way to either make the plot blank or add text to a "blank sheet". I would like to "plot" a page that contains just text, no plot lines, labels, etc. Suggestions? Kevin [[alternative HTML version deleted]]
2011 Aug 17
3
getNativeSymbolInfo("user_unif_rand") returns different results on windows and linux
Hi, When loading a package that provides the user-supplied RNG hook user_unif_rand, calling getNativeSymbolInfo("user_unif_rand") returns informations about the loaded symbol. I am using this to identify which package currently provides the RNG hook. The results are the same on windows and linux if only one library provides the hook. If one loads a second package that provides this
2008 Oct 10
2
Leap year?
Given a Date object or simply a year is there an R function to tell me if the it is a leap year or not? I was hoping for something like 'is.leapyear'. I probably can build my own function (year divisible by 4 etc.) but I would rather use an existing function if it is available. Thank you. Kevin
2008 Aug 28
6
Function not returning a vector?
Why does: (shape/scale) * (1:365/scale)^(shape - 1) return a vector of numbers but calling a function hasard(1:365,shape,scale) defined like: hazard <- function(x,shape,scale) { return (shape/scale) * (x/scale)^(shape - 1) } Only return a single value? It is like x becomes a single value passed as an argument. Thank you. Kevin
2010 Mar 22
2
Factors attribute?
I noticed that when I fit a linear model using 'lm' there is an attribute called "factors" that is added to the "term". It doesn't seem to appear for 'model.matrix', just 'lm'. I have been unable to find where it gets constructed or what it means? It looks like a two dimensional array that I may be able to use so I would just like to get some
2009 Jan 03
5
Power functions?
I had a question about the basic power functions in R. For example from the R console I enter: -1 ^ 2 [1] -1 but also -1^3 [1] -1 -0.1^2 [1] -0.01 Normally pow(-1, 2) return either -Infinity or NaN. Has R taken over the math functions? If so I would think that -1^2 is 1 not -1 and -0.1^2 is 0.01 not -0.01. Thank you. Kevin
2011 Nov 07
3
Upgrade R?
I am trying to upgrade to R 2.14 from R 2.13.1 I have compied all the libraries from the 'library' directory in my existing installation (2.13.1) to the installed R 2.14. Now I want to uninstall the old installation (R 2.13.1) and I get the error: Internal Error: Cannot find utCompiledCode record for this version of the uninstaller. Any ideas? Kevin [[alternative HTML
2009 Oct 28
5
PDF Corrupted?
I am running R 2.9.2 and creating a PDF that I am trying to open with Adobe Reader 9.2 but when I try to open it the reader responds with "There was an error opening this document. The file is damaged and cannot be repaired.: I am using the R command(s): pdf(file="cat.pdf", title="Historical Sales By Category") for(j in 1:length(master)) { d <-
2008 Aug 03
2
Determining model parameters
This may be a begining question. If so, please bear with me. If I have some data that based on the historgram and other plots it "looks" like a beta distribution. Is there a function or functions within R to help me determine the model parameters for such a distirbution? Similarily for other "common" distirbutions, Poisson(lambda), Chi-Square(degrees of freedom, chi-square
2010 Jan 03
3
F77_CALL, F77_NAME definition
I give up. Maybe it is my search (Windows) but I cannot seem to find the definition of the F77_CALL or F77_NAME macros. Either there are too many matches or the search just doesn't find it. For example where is the source for: F77_CALL(dpotri) ? Thank you. Kevin
2008 Jul 15
4
Iterations
I have a command that reads in some data: x <- read.csv("Sales2007.dat", header=TRUE) Then I try to organize the data: sc <- split(x, list(x$Category, x$SubCategory), drop=TRUE) Then I want to iterate through the data. I was able to get the following to run on the R console: for(i in 1:length(sc)) { sum(sc[[i]]$Quantity) } But notiing is primted on the console. I find