Displaying 14 results from an estimated 14 matches for "mbmiller".
2011 Jan 31
2
computing var-covar matrix with much missing data
Is there an R function for computing a variance-covariance matrix that
guarantees that it will have no negative eigenvalues? In my case, there
is a *lot* of missing data, especially for a subset of variables. I think
my tactic will be to compute cor(x, use="pairwise.complete.obs") and then
pre- and post-multiply by a diagonal matrix of standard deviations that
were computed based
2005 Nov 08
4
writing R shell scripts?
...t isn't quite it because I tried it and it didn't work!
Any advice greatly appreciated. Thanks in advance.
Mike
--
Michael B. Miller, Ph.D.
Assistant Professor
Division of Epidemiology and Community Health
and Institute of Human Genetics
University of Minnesota
http://taxa.epi.umn.edu/~mbmiller/
2012 Oct 02
1
R process must die - can I save history?
I connected from my desktop Linux box to a Linux server using ssh in an
xterm, but that xterm was running in Xvnc. I'm running R on the server in
that xterm (over ssh). Something went wrong with Xvnc that has caused it
to hang, probably this bug:
https://bugs.launchpad.net/ubuntu/+source/vnc4/+bug/819473
So I can't get back to that ssh session or to R. I had done a bunch of
work
2009 Mar 27
5
use of "@" character in variable name
Importing data with a header row using read.delim, one variable should be
named @5HTT but it is automatically renamed to X.5HTT, presumably because
the "@" is either unacceptable or misunderstood. I've tried to find out
what the rules are on variable names but have been unsuccessful. I'll bet
someone here can tell me where to look. Maybe it's hidden away in here
2005 Nov 09
5
How to find statistics like that.
Hi there,
Suppose mu is constant, and error is normally distributed with mean 0 and
fixed variance s. I need to find a statistics that:
Y_i = mu + beta1* I1_i beta2*I2_i + beta3*I1_i*I2_i + +error, where I_i is
1 Y_i is from group A, and 0 if Y_i is from group B.
It is large when beta1=beta2=0
It is small when beta1 and/or beta2 is not equal to 0
How can I find it by R? Thank you very much
2011 May 02
1
UNIX-like "cut" command in R
The R "cut" command is entirely different from the UNIX "cut" command.
The latter retains selected fields in a line of text. I can do that kind
of manipulation using sub() or gsub(), but it is tedious. I assume there
is an R function that will do this, but I don't know its name. Can you
tell me?
I'm also guessing that there is a web page somewhere that will tell
2010 Mar 14
0
nano syntax highlighting for R
Nano is Free Software and a nice intro text editor. It also starts up
very quickly and has good syntax highlighting functionality, so it makes a
nice file viewer. The syntax highlighting is configured in the ~/.nanorc
file. See the attached code and screenshot.
I was looking for good nano syntax highlighting code for R when I found by
Stephen Haptonstahl's code here:
2011 Jan 24
1
determining the order in which points are plotted
I make plenty of scatterplots, especially using scatterplot.matrix from
library(car). One thing I don't know how to do is determine which points
are plotted last. Sometimes I plot a large number of points for multiple
groups represented by different colors.
I would like to guarantee that point that are far from the centroid for
their group are plotted last. This way they will be
2011 Apr 16
0
is "Gb" gigabyte or gigabit?
I sometimes get errors of this form:
Error: cannot allocate vector of size 13.8 Gb
I've also seen "Gb" used in R documents. Is "Gb" being used to refer to
gigabyte? We usually refer to bytes and gigabytes when discussing memory
usage, but the lowercase "b" more often refers to bits. According to
Wikipedia:
http://en.wikipedia.org/wiki/Gigabyte
2011 Sep 07
1
storage and single-precision
I'm getting the impression from on-line docs that R cannot work with
single-precision floating-point numbers, but that it has a pseudo-mode for
single precision for communication with external programs.
I don't mind that R is using doubles internally, but what about storage?
If all I need to store is single-precision (32-bit), can I do that? When
it is read back into R it can be
2009 Apr 24
1
use of "input" in system()
First, it looks like there is bug in the documentation...
According to the documentation for system():
http://stat.ethz.ch/R-manual/R-patched/library/base/html/system.html
input if a character vector is supplied, this is copied one string per
line to a temporary file, and the standard input of command is
redirected to the file
This seems to mean that the standard input
2009 Apr 24
1
font size relative to graphic
I am printing numbers onto horizontal bars in a bar plots, but I am
finding it difficult to make the number always the right size. If there
are more bars, the bars get narrower and the font is too big. I also find
that if I change the size of the graph, the bars will get wider or
narrower and the font stays about the same size. The result depends on
whether I view the graph in X11 or in
2011 Apr 14
1
integer and floating-point storage
I note that "current implementations of R use 32-bit integers for integer
vectors," but I am working with large arrays that contain integers from 0
to 3, so they could be stored as unsigned 8-bit integers. Can R do this?
(FYI -- This is for storing minor-allele counts for genetic studies.
There are 0, 1 or 2 minor alleles and 3 would represent missing.)
It is theoretically possible
2009 Jan 22
1
maintaining variable types in data frames
Suppose X and Y are two data frames with the same structures, variable
names and dimensions but with different data and different patterns of
missing. I want to replace missing values in Y with corresponding values
from X. I'll construct a simple two-by-two case:
> X <- as.data.frame(matrix(c("a","b",1,2),2,2), stringsAsFactors=FALSE)
> X[,2] <-