Re: [R] Wireframe plot inside a function

2017-04-21 Thread George Trojan - NOAA Federal
1, main = "cop1 function")) > > -- > Sent from my phone. Please excuse my brevity. > > On April 21, 2017 1:56:00 PM PDT, George Trojan - NOAA Federal > <george.tro...@noaa.gov> wrote: >>I see. So, if I don't care about the plot object itself, the proper >

Re: [R] Wireframe plot inside a function

2017-04-21 Thread George Trojan - NOAA Federal
tiple plots and/or tables together > you will find that something like knitr and RMarkdown are very helpful. > -- > Sent from my phone. Please excuse my brevity. > > On April 21, 2017 11:59:28 AM PDT, George Trojan - NOAA Federal > <george.tro...@noaa.gov> wrote: >>Th

Re: [R] Wireframe plot inside a function

2017-04-21 Thread George Trojan - NOAA Federal
.. you are the one making it difficult for us to > read your question. > > -- > Sent from my phone. Please excuse my brevity. > > On April 21, 2017 8:27:20 AM PDT, George Trojan - NOAA Federal > <george.tro...@noaa.gov> wrote: >>Consider the following example: &g

Re: [R] Interesting quirk with fractions and rounding

2017-04-21 Thread George Trojan - NOAA Federal
The subject is messy. I vaguely remember learning this stuff on my first numerical analysis course over 40 years ago. The classic reference material (much newer, only 25 years old) is: What Every Computer Scientist Should Know About Floating-Point Arithmetic, David Goldberg, ACM Computing Surveys,

[R] Wireframe plot inside a function

2017-04-21 Thread George Trojan - NOAA Federal
Consider the following example: library("kdecopula") library("mvtnorm") pobs <- function(x) rank(x) / (length(x) + 1) n <- 1000 sigma1 <- diag(x = 1, 2, 2) x1 <- rmvnorm(n, sigma = sigma1) xx1 <- apply(x1, 2, pobs) cop1 <- kdecop(xx1) eps <- 0.8 sigma2 <- matrix(c(1, eps, eps, 1), ncol = 2)

[R] Question about logspline

2017-02-21 Thread George Trojan - NOAA Federal
I have a dataset with values of limited precision. I am trying to plot its density using package logspline. The logspline() call with default parameters causes oscillations in the density plot. My solution was to fuzzify the input values, using function: > fuzz <- function(x, prec) x +

Re: [R] Help with saving user defined functions

2017-02-12 Thread George Trojan - NOAA Federal
your second version -- if tmp is removed the > function will fail. > > > > 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

[R] Help with saving user defined functions

2017-02-12 Thread George Trojan - NOAA Federal
I can't figure out how to save functions to RDS file. Here is an example what I am trying to achieve: > t <- rnorm(100) > cdf <- ecdf(t) > cdf(0) [1] 0.59 > saveRDS(cdf, "/tmp/foo") > Save workspace image? [y/n/c]: n [gtrojan@asok petproject]$ R > cdf <- readRDS("/tmp/foo") > cdf Empirical CDF

[R] R2Cube integration errors

2017-01-26 Thread George Trojan - NOAA Federal
Why this happens? > library("R2Cuba") > f <- function(x) 0 > cuhre(ndim=1, ncomp=1, f) Iteration 1: 11 integrand evaluations so far [1] 0 +- 0 chisq 0 (0 df) Iteration 2: 33 integrand evaluations so far [1] 0 +- 0 chisq 0 (1 df) integral: 0 (+-0) nregions: 2; number of evaluations:

[R] rgl does not plot

2017-01-19 Thread George Trojan - NOAA Federal
I have installed package rgl without any problems. I can load the library, issue commands from console without any errors showing up, however I can't get anything plotted. Example session: > library(rgl) > plot3d(rnorm(100), rnorm(100), rnorm(100)) > rgl.quit() > library(rgl) > .check3d() glX 1

[R] gamlss question

2016-12-22 Thread George Trojan - NOAA Federal
What is the recommended way of accessing distribution parameters (mu, sigma, ...) from the model fit? The indention is to use those values in d/p/q/r calls. I came out with a wrapper gamlss_fit <- function(x, family) { fit <- gamlssML(x, family = family) mu <- fitted(fit, "mu")[1]

Re: [R] R cannot access the web?

2010-05-14 Thread Trojan
? To: Trojan ypa...@usc.edu On May 13, 2010, at 6:29 PM, Trojan wrote: Hi, I had originally posted regarding an error when trying to install package - GenABEL - it has now become clear that R is not able to connect to the net. Below are a couple of things I've tried

Re: [R] R cannot access the web?

2010-05-14 Thread Trojan
I am sorry guys neither of those things have worked! I am at an absolute loss! I did contact the HPC server managers to see if they are willing to update the version of R that's accessible to us - but I am not sure if or when they will make the changes. -- View this message in context:

[R] install.packages Error

2010-05-13 Thread Trojan
Hi all! I am trying to install package - GenABEL in a Linux (RedHat) environment using R 2.6.2. The CRAN Mirror starts up, I select the site, but I end up with the following error: ** Warning: unable to access index for repository

[R] R cannot access the web?

2010-05-13 Thread Trojan
Hi, I had originally posted regarding an error when trying to install package - GenABEL - it has now become clear that R is not able to connect to the net. Below are a couple of things I've tried with the resulting errors I am running R 2.6.2 on Linux e15 X86 How can I fix this? Thank you!