Displaying 5 results from an estimated 5 matches for "polhamus".
2007 Oct 01
1
Sample fromt he real line
...;s an answer... Can R generate a random variable uniformly distributed on -Inf to Inf? Philosophically this doesn't seem possible, and if not, as I imagine so, is there some sort of generally accepted factor I should be multiplying by a Unif(-1,1) rv to sample from the real line?
Thanks,
Dan Polhamus
[[alternative HTML version deleted]]
2013 Nov 21
1
R CMD check (v-3.0.2) not loading $R_CHECK_ENVIRON
...ron
Still no luck. Finally, I just set R_LIBS globally (which, was empty)
before running the check and the dependencies are then found. Just wanted
to be sure I'm not missing something before creating a bug report.
This is on Ubuntu 10.04 with R-3.0.2, as root.
Many thanks...
--
Daniel G Polhamus, PhD
Metrum Research Group, LLC
[[alternative HTML version deleted]]
2011 Jan 17
2
Difficult with round() function
...39; variable, for
whatever reason R doesn't read it that way. I would be very grateful for any
advice on how I can either alter my approach entirely (I am sure there is a
far more elegant way to regrid data in R) or a simple fix for this rounding
error.
Many thanks in advance,
Aaron
--
Aaron Polhamus <aaronpolhamus@gmail.com>
Statistical consultant, Revolution Analytics
MSc Applied Statistics, The University of Oxford, 2009
838a NW 52nd St, Seattle, WA 98107
Cell: +1 (206) 380.3948
[[alternative HTML version deleted]]
2011 Mar 11
1
Easy 'apply' question
Dear list,
I couldn't find a solution for this problem online, as simple as it seems.
Here's the problem:
#Construct test dataframe
tf <- data.frame(1:3,4:6,c("A","A","A"))
#Try the apply function I'm trying to use
test <- apply(tf,2,function(x) if(is.numeric(x)) mean(x) else unique(x)[1])
#Look at the output--all columns treated as character
2010 Dec 02
1
Arrange elements on a matrix according to rowSums + short 'apply' Q
Greetings,
My goal is to create a Markov transition matrix (probability of moving from
one state to another) with the 'highest traffic' portion of the matrix
occupying the top-left section. Consider the following sample:
inputData <- c(
c(5, 3, 1, 6, 7),
c(9, 7, 3, 10, 11),
c(1, 2, 3, 4, 5),
c(2, 4, 6, 8, 10),
c(9, 5, 2, 1, 1)
)
MAT <- matrix(inputData,