similar to: model.matrix and missing values

Displaying 20 results from an estimated 2000 matches similar to: "model.matrix and missing values"

2013 Feb 09
1
Swaeve, Beamer and \alt
Hi, I am having trouble getting \alt (or \altenv) to work with Schunk/Sinput and was wondering if anybody had had success? With the slide \begin{frame}[fragile]\frametitle{Basic R} \alt<2>{ <<echo=TRUE>>= 2+2 @ }{ <<echo=TRUE, eval=FALSE>>= 2+2 @ } \end{frame} I get the error message: ! FancyVerb Error: Extraneous input `> 2+2 \end {Sinput} \end
2014 Mar 17
1
valgrind and C++
Hi, I am sorry if this is perceived as a C++ question rather than an R question. After uploading an R library to CRAN (MCMCglmm) the C++ code failed to pass the memory checks. The errors come in pairs like: Mismatched free() / delete / delete [] at 0x4A077E6: free (vg_replace_malloc.c:446) by 0x144FA28E: MCMCglmm (MCMCglmm.cc:2184) Address 0x129850c0 is 0 bytes inside a block of size 4
2009 Feb 20
2
change attributes of all data.frame elements
Hi, I was wondering whether there was an easy way to change the attributes of all elements in a data.frame (rather than looping through elements)? Specifically, I would like to set the "dim" attributes to NULL Thanks for any help, Jarrod -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
2014 Mar 14
1
Conditional jump or move depends on uninitialised value(s)
Hi, I'm using valgrind to check over some C/C++ code for an R library. I'm getting the report (see below), but can't track down the uninitialised value(s). I tried using --track-origins=yes in valgrind which gives: ==28258== Uninitialised value was created by a stack allocation ==28258== at 0xEE33D98: ??? (in /usr/lib64/R/lib/libRlapack.so) I presume the problem is an
2003 Jul 22
2
animal models and lme
Hi, You should look at Pinheiro and Bates (2000) Mixed-effects models in S and S-Plus. It describes how to format the correlation matrix to pass to functions lme and gls. Basically, the correlation matrix has to be one of the corStruct classes, probably corSymm for your example. So in the call to lme (or gls if you really have no random effects), use something like:
2009 Jun 16
1
Output of Anova (CAR package) in Sweave
Dear list, I use Sweave almost exclusively for writing papers, and I have become quite spoiled by the excellent xtable export facilities. Has anybody written an xtable method for the Anova function in CAR, or has anybody used a different set of functions to import Anova results into a table in an Sweave document? If not, any handy hints on how to write a good homebrew based on the output of Anova
2003 Dec 18
3
mclust - clustering by spatial patterns
Dear All, I have spatial data (presence/absence for 4000 squares) on 250 bird species and would like to use a model-based clustering technique to test for species associations. Is there any way of passing a distance/correlation matrix to mclust as with hclust, rather than the actual data? Or alternatively, is there a way of getting mclust to handle binary data? I'd appreciate any
2008 Jun 28
2
String concatenation
Hi, Is the following function built in somewhere? concat = function(v) { res = "" for (i in 1:length(v)) res = paste(res,v[i],sep="") res } e.g. > concat(c("12","3","45")) [1] "12345" Cheers, Andy -- Andy Fugard, Postgraduate Research Student Psychology (Room F3), The University of Edinburgh, 7 George
2007 Aug 08
1
converting character string to an expression
Hi Everyone, I would simply like to coerce a character string into an expression: something like: as.expression(paste(letters[1:3], collapse="+")) but I can't seem to get rid of the quotes. The only way I can get it to work is using as.formula: as.expression(as.formula(paste("~", paste(letters[1:3], collapse="+")))) but this requires the expression to
2009 Nov 03
2
how to display a string containing greek chrs and variables
I'm trying something that I thought would be pretty simple, but it's proving quite frustrating... I want to display, for instance, the correlation coefficient "rho" in a graph. I can do something like: text(x, y, paste("rho =", cor)) where cor would be my previously calculated correlation coefficient, and x and y the coordinates. Obviously that displays
2008 Aug 15
6
Opening a web browser from R?
Hi, I was wondering if there's a way in R to open a web browser (such as Internet Explorer, or Firefox or whatever). I'm doing some analyses that have associated urls, and it would be nice to have the ability to directly open the relevant page from within R. I was looking at the help for 'url' and I can see I can probably access the information I need and display it in my
2010 Jul 27
1
R CMD build wiped my computer
Hi, I ran R (version 2.9.0) CMD build under root in Fedora (9). When it tried to remove "junk files" it removed EVERYTHING in my local account! (See below). Can anyone tell me what happened, and even more importantly if I can I restore what was lost. Panickingly, Jarrod [jarrod at localhost AManal]$ R CMD build MCMCglmm_2.05 * checking for file
2010 Jul 27
1
R CMD build wiped my computer
Hi, I ran R (version 2.9.0) CMD build under root in Fedora (9). When it tried to remove "junk files" it removed EVERYTHING in my local account! (See below). Can anyone tell me what happened, and even more importantly if I can I restore what was lost. Panickingly, Jarrod [jarrod at localhost AManal]$ R CMD build MCMCglmm_2.05 * checking for file
2011 Jul 25
2
How to find the likelihood of a null model in R
Dear All, I am working on a dataset having the dependent variable as ordinal data(discrete data) and multiple independent variables. I need to find the likelihood for the NULL model.i.e the model with only the dependent variable and all other independent variables as zero. Kindly let me know how to find the likelihood for a NULL model in R. Is there any specific function in R that can do
2007 Dec 03
1
linking C/C++ external libraries.
Hi Everyone, I'm trying to load some C++ code using dyn.load but I'm getting unresolved symbols associated with some external libraries (CSparse). I gather this is something to do with linking as the the code compiles fine. However, I've passed -L/home/jarrod/My_Programs/SuiteSparse/CSparse/Lib -lcsparse to the complier (g++), either directly using R CMD SHLIB or as
2006 Feb 08
1
nested random effects in glmm.admb
Hello all, In a previous posting regarding glmm.admb it is stated that glmm.admb can handle 2 nested random effects. I can only fit a single random term at the moment, and wondered if anyone could provide me with some information on how to specify a model with 2 (nested or cross-classified) random terms? Thanks, Jarrod.
2008 Sep 01
1
Polychoric and tetrachoric correlation
Hi there, Am I correct to believe that tetrachoric correlation is a special case of polychoric correlation when there are only two levels to the ordered factor? Thus it should be okay to use hetcor from the polycor package to build a matrix of correlations for binary variables? If this is true, how can one estimate 95% confidence intervals for the correlations? My guess would be mat =
2008 Mar 04
1
battery.temperature vs ups.temperature
The (2.2.1) upshid-ups driver reports battery.temperature rather than ups.temperature. Here's a quick patch to have it show up in the status page... --- clients/upsstats.c.DIST 2008-03-04 09:15:40.000000000 +0000 +++ clients/upsstats.c 2008-03-04 09:16:20.000000000 +0000 @@ -787,6 +787,11 @@ return 1; } + if (!strcmp(cmd, "BATTTEMP")) { +
2017 Jun 23
1
qemu-kvm-ev-2.6.0-28.el7_3.10.1 now available
On Fri, Jun 23, 2017 at 11:26 AM, Chris Cooke <cc at inf.ed.ac.uk> wrote: > qemu-kvm-ev-2.6.0-28.el7.10.1 > <https://cbs.centos.org/koji/buildinfo?buildID=17495> has been tagged for > release and will soon be available on CentOS mirrors. > > > Hi Sandro, > > Thanks. That looks like a typo in the package release field? Should be > 28.el7_3.10.1, rather than
2008 Sep 23
2
read.table & readLines behaviour?
Hi, I have been using 'read.table' regularly to read tab-delimited text files with data. No problem, until now. Now I have a file that appeared to have read fine, and the data inside looks correct (structure etc), except I only had 15000+ rows out of the expected 24000. Using 'readLines' instead, and breaking up the data by tabs, gives me the expected result. I do not