Displaying 20 results from an estimated 600 matches similar to: "sd() of column, but for a subset of rows"
2015 Sep 14
3
Optimization bug when byte compiling with gcc 5.2.0 on windows
When building R-devel with gcc 5.2.0 (mingw-w64 v4) on Windows, make
check fails reg-tests-1b.R at the following check:
x <- c(1:2, NA)
sx <- sd(x)
!is.nan(sx)
Here 'sx' should be 'NA' but it is 'NaN'. It turns out this problem
only appears when the function is byte compiled with optimization
level 3:
mysd <- function (x, na.rm = FALSE)
sqrt(var(if
2015 Sep 14
0
Optimization bug when byte compiling with gcc 5.2.0 on windows
I believe the issue is that on Windows the sqrt function when called
with a NaN does not return the same NaN, as it does on other platforms.
We have
#if (defined(_WIN32) || defined(_WIN64)) && defined(__GNUC__) && \
__GNUC__ <= 4
# define R_sqrt(x) (ISNAN(x) ? x : sqrt(x))
#else
# define R_sqrt sqrt
#endif
for implementing the SQRT opcode. I suspect this came from Duncan
2009 Apr 13
1
"Select Script File" window
Suddenly WINE have started to bring a Select Script File window whenever I try to start application with its parameters from a shortcut.
Image:[Image: http://img523.imageshack.us/img523/4844/wineselectscript.jpg ]
This is the full copypaste from a terminal when I try to execute the line that the shortcut would too:
Code:
epri at epri-ubu32-desk:~$ wine "/home/epri/.wine/drive_c/Program
2012 Jul 02
0
Fit circle with R
Dear Researchers,
I wrote two function to fit a circle using noisy data.
1- the fitCircle() is derived from MATLAB code of * zhak Bucher* from the
link
http://www.mathworks.com/matlabcentral/fileexchange/5557-circle-fit/content/circfit.m
2- the CircleFitByPratt() from MATLAB code of *Nikolai Chernov *from the
link
2007 Feb 23
1
how to use apply with two variables
Hi,
this is a made-up example. Function "myfun" returns two arguments. Can
"apply" be used so that "myfun" is called only once?
Thanks
Serguei
mat<-matrix(runif(50),nrow=10,ncol=5)
myfun<-function(x) {
mymean<-mean(x)
mysd<-sd(x)
return(mymean,mysd)
}
out1<-t(apply(mat,1,function(x) myfun(x)$mymean))
out2<-t(apply(mat,1,function(x)
2015 Sep 14
2
Optimization bug when byte compiling with gcc 5.2.0 on windows
On 14/09/2015 9:36 AM, luke-tierney at uiowa.edu wrote:
> I believe the issue is that on Windows the sqrt function when called
> with a NaN does not return the same NaN, as it does on other platforms.
> We have
>
> #if (defined(_WIN32) || defined(_WIN64)) && defined(__GNUC__) && \
> __GNUC__ <= 4
> # define R_sqrt(x) (ISNAN(x) ? x : sqrt(x))
> #else
2010 Jun 29
1
Sweave, xtable plus/minus sign
Dear R-users,
please consider the following minimal example:
\documentclass[a4paper,titlepage,onecolumn,12pt]{article}
\usepackage[italian]{babel}
\usepackage{amssymb}
\usepackage[utf8x]{inputenc}
\usepackage[pdftex]{graphicx}
\begin{document}
<<label=test, echo=FALSE, results=tex>>=
df.data1 <-
cbind.data.frame(A = rnorm(18),
B =factor(rep(LETTERS[1:6],
2007 Feb 14
0
How to use Rpad
I am a beginner and I don't know how to use Rpad package.
I installed it and opened the following example .Rpad page in Internet
Explorer.
When I clicked "Calculate" button, nothing seems to happen. Can anyone tell
me how to use Rpad?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<!-- by Tom Short, EPRI, tshort at epri.com
(c) Copyright 2005 by
2010 Nov 09
2
Help with Iterator
Dear Experts,
The following is my "Iterator". When I try to write a new function with
itel, I got error.
This is what I have:
> supDist<-function(x,y) return(max(abs(x-y)))
>
> myIterator <- function(xinit,f,data=NULL,eps=1e-6,itmax=5,verbose=FALSE) {
+ xold<-xinit
+ itel<-0
+ repeat {
+ xnew<-f(xold,data)
+ if (verbose) {
+ cat(
+
2009 May 20
1
Re: "Select Script File" window
austin987 wrote:
> On Mon, Apr 13, 2009 at 7:58 AM, rautamiekka <wineforum-user at winehq.org> wrote:
>
> > Suddenly WINE have started to bring a Select Script File window whenever I try to start application with its parameters from a shortcut.
> >
> > Image:[Image: http://img523.imageshack.us/img523/4844/wineselectscript.jpg ]
> >
> >
> > This
2007 Jul 07
1
calculating p-values of columns in a dataframe
I have a dataframe ("mydf") that contains "differences of means".
I wish to test whether these differences are significantly different from zero.
Below, I calculate the t-statistic for each column.
What is a "good" method to calculate/look-up the p-value for each column?
mydf=data.frame(a=c(1,-22,3,-4),b=c(5,-6,-7,9))
mymean=mean(mydf)
mysd=sd(mydf)
2010 Jun 23
2
About normality tests...
Hi all,
I have two very large samples of data (10000+ data points) and would
like to perform normality tests on it. I know that p < .05 means that
a data set is considered as not normal with any of the two tests. I am
also aware that large samples tend to lead more likely to normal
results (Andy Field, 2005).
I have a few questions to ensure that I am using them right.
1) The Shapiro-Wilk
2007 Jan 26
2
Using functions within functions (environment problems)
Hi everyone,
I've been having difficulty writing wrapper functions for some
functions where those same functions include other functions with
eval()
calls where the environment is specified. A very simple example using
function lmer from lme4:
lmerWrapper <- function(formula, data, family = gaussian, method =
c("REML",
"ML", "PQL", "Laplace",
2006 Jan 26
2
Prediction when using orthogonal polynomials in regression
Folks,
I'm doing fine with using orthogonal polynomials in a regression context:
# We will deal with noisy data from the d.g.p. y = sin(x) + e
x <- seq(0, 3.141592654, length.out=20)
y <- sin(x) + 0.1*rnorm(10)
d <- lm(y ~ poly(x, 4))
plot(x, y, type="l"); lines(x, d$fitted.values, col="blue") # Fits great!
all.equal(as.numeric(d$coefficients[1] + m
2001 May 23
1
Passing a string variable to Surv
Hi,
I am trying to write a function to automate multiple graph
generation. My data looks like:
Table of numeric values with the following headers:
timeM1 statusM1 xM1 timeM2 statusM2 xM2 timeM3 statusM3 xM3
1
2
3
4
5
6
Where M1,M2, M3 hve no similarity except they have a max string length
of 7. Examples are mcw0045, adl0003, lei0101.
Now, what I want to do is
Function(M1, M2,
2002 Jun 21
4
configure problem --- Can't find recent OpenSSL libcrypto
Hello Gurus,
I tried my best as I can to do RTFM and Googling to find any information to
solve the problem myself which I failed.
I installed OpenSSL 0.9.6d 9 May 2002 with this option on a Solaris 8 box
using Sun Forte6-2
$config solaris64-sparcv9-cc --prefix=/local/santanu/pkg/ssl
Now I am trying to install openssh 3.2.3p1 and getting this error.
configure:8285: error: *** Can't find
2007 Jul 22
1
Package design, placement of legacy functions
I have a function XOLD() from a nearly verbatim port of legacy
FORTRAN in a package. I have remplemented this function as XNEW()
using much cleaner native R and built-in functions of R. I have
switched the package to the XNEW(), but for historical reasons would
like to retain the XOLD() somewhere in the package directory
structure. An assertion through a README or other will point to
2004 Sep 17
0
Announcing Rpad, a web-based workbook-style interface for R
Rpad is an interactive, web-based analysis system. Rpad pages are
interactive workbook-type sheets based on R. Rpad is an analysis package, a
web-page designer, and a gui designer all wrapped in one. Rpad pages are
run from the browser and connect to R running on the server (the same
server that hosts the web pages).
Rpad includes the R package "RpadUtils", which adds convenient code
2004 Sep 17
0
Announcing Rpad, a web-based workbook-style interface for R
Rpad is an interactive, web-based analysis system. Rpad pages are
interactive workbook-type sheets based on R. Rpad is an analysis package, a
web-page designer, and a gui designer all wrapped in one. Rpad pages are
run from the browser and connect to R running on the server (the same
server that hosts the web pages).
Rpad includes the R package "RpadUtils", which adds convenient code
2005 Sep 06
2
Predicting responses using ace
Hello everybody,
I'm a new user of R and I'm working right now with the ACE function
from the acepack library. I Have a question: Is there a way to predict
new responses using ACE? What I mean is doing something similar to the
following code that uses PPR (Projection Pursuit Regression):
library(MASS)
x <- runif(20, 0, 1)
xnew <- runif(2000, 0, 1)
y <- sin(x)
a <- ppr(x, y,