Displaying 20 results from an estimated 200 matches similar to: "Creating a vector based on lookup function"
2008 Dec 12
1
Creating a vector
Good day all,
I am having seom trouble building a simple vector. Below my sample code
shows what ime trying to do and i have pointed out where the issue is. What
happens not is that a single "TAZDetermine_FEET" is selected by i need
multiple values, as many as there are "cands". I am thinking that this
should occur within the for loop and add a
2012 Feb 13
2
R's AIC values differ from published values
Using the Cement hardening data in Anderson (2008) Model Based Inference in
the Life Sciences. A Primer on Evidence, and working with the best model
which is
lm ( y ~ x1 + x2, data = cement )
the AIC value from R is
model <- lm ( formula = y ~ x1 + x2 , data =
cement )
AIC ( model )
64.312
which can be converted to AICc by adding the bias
2006 Jun 14
3
appending
All,
In the function below I have 24 individuals and 6 calculations per
individual.
The 6 calculations are collected each time in a 1:24 loop when
calculating "delta".
I'd like to collect all 144 = 24*6 calculations in one vector
("delta.patient.comb").
The function works as is via indexing, but is there an easier way to
collect the measurements via appendinng the 6
2010 Sep 16
2
glm: formula vs character
Hello,
This is a question motivated by curiosity, not a pressing problem. Any
responses are much appreciated! In the following code, function reg1 calls
glm with a formula object while reg2 uses a string. In both cases, glm
works; however, in the second case, the add1 function fails with the
following message: "Error in eval(predvars, data, env) : invalid 'envir'
argument."
2009 Jul 08
1
Dantzig Selector
Hi,
I was wondering if there was an R package or routines for the Dantzig
Selector (Candes & Tao, 2007). I know Emmanuel Candes has Matlab
routines to do this but I was wondering if someone had ported those to
R.
Thanks,
T
---Reference---
@article{candes2007dantzig,
title={{The Dantzig selector: statistical estimation when p is much
larger than n}},
author={Candes, E. and Tao, T.},
2017 Nov 23
3
mischeduler (pre-RA) experiments
Hi,
I have been experimenting for a while with tryCandidate() method of the
pre-RA mischeduler. I have by chance found some parameters that give
quite good results on benchmarks on SystemZ (on average 1% improvement,
some improvements of several percent and very little regressions).
Basically, I add a "latency heuristic boost" just above processor
resources checking:
2012 Sep 13
1
AICcmodavg
I am using the AICmodavg package and using R version 2.15.1. I need help
with code that is instead being read as text.
Below is a subset of code... I actually have 12 models, but I am trying to
get this to work for 2 below right now.
Everything 'appears' to work through the line starting with Modnames. After
that the code starting with aictab and beyond is recognized as text and not
2006 Mar 30
1
Predict function for 'newdata' of different dimension in svm
I am using the "predict" function on a support vector machine (svm)
object, and I don't understand why I can't predict on a dataset with more
observations than the training dataset.
I think this problem is a generic "predict" problem, but I'm not sure.
The original svm was fit on 50 observations.
2009 Dec 09
1
partial match for two datasets
Hi all,
I have two sets:
dig<-c("DAVID ADAMS","PIERS AKERMAN","SHERYLE BAGWELL","JULIAN BAJKOWSKI","CANDIDA BAKER")
import<-c("by DAVID ADAMS","piersAKERMAN","SHERYLE BagWEL","JULIAN BAJKOWSKI with ","Cand BAKER","smith green")
I want to get the following result from
2010 Dec 14
2
How to bind models into a list of models?
Hi R-helpers,
I have a character object called dd that has 32 elements each of which
is a model formula contained within quotation marks. Here's what it
looks like:
> dd
[1] "lm(y ~ 1,data=Cement)" "lm(y ~
X,data=Cement)" "lm(y ~ X1,data=Cement)"
[4] "lm(y ~ X2,data=Cement)" "lm(y ~
2018 Feb 20
1
question regarding the AICcmodavg package
Dear moderator,
If possible I would like to send in the following question for R-help:
I am analyzing a small data set using PGLS with phylogenetic uncertainty
taken into account and thereby including 100 potential phylogenetic tree
scenarios. I've managed to run models on all of the different trees and
performed model averaging to get parameter estimates for the intercept and
most of the
2004 Jun 07
1
mode data=journal. Is it safe to use?
Hello
I can see several postings on this mailing-list that people have problem
with mounting ext3 partition with mode data=journal.
See URL's:
https://www.redhat.com/archives/ext3-users/2004-March/msg00000.html
https://www.redhat.com/archives/ext3-users/2004-March/msg00050.html
We are going to use ext3 on a Compact Flash disk in true IDE mode. We
need this filesystem to be as safe and
2010 Jan 01
2
changing a list element's name during execution in lapply - possible?
Happy New Year, all!
I want to do calculations on each element of a list l, but i want the
returned list element to be named differently after the calculation.
Is it possible to do the renaming somehow within the lapply call?
l <- list(a=NA, b=NA)
lapply(l, function(x) {names(x) <- "new name"; return(x) })
This does not work, any ideas?
TIA
2009 Dec 02
2
Reordering the results from table(cut()) by break argument
I have a vector and need to count how many data points fall inside
each bin:
dat <- rnorm(100)
breaks <- -3:3
table((cut(dat, breaks)))
(-3,-2] (-2,-1] (-1,0] (0,1] (1,2] (2,3]
3 13 42 30 12 0
if I reverse the breaks vector, the results remains the same:
breaks <- rev(breaks)
table((cut(dat, breaks)))
(-3,-2] (-2,-1] (-1,0] (0,1] (1,2]
2015 Mar 27
2
[LLVMdev] Question about load clustering in the machine scheduler
On Thu, Mar 26, 2015 at 11:50:20PM -0700, Andrew Trick wrote:
>
> > On Mar 26, 2015, at 7:36 PM, Tom Stellard <tom at stellard.net> wrote:
> >
> > Hi,
> >
> > I have a program with over 100 loads (each with a 10 cycle latency)
> > at the beginning of the program, and I can't figure out how to get
> > the machine scheduler to intermix ALU
2004 Jun 15
6
mode data=journal in ext3. Is it safe to use?
Hello
I try again.
Can anybody of you acknowledge or not if mode data=journal in ext3 is
safe to use in Linux kernel 2.6.x?
Wee need to have a very consistent and integrity for our filesystem, and
it would then be desired to journal both data and metadata.
But if this mode can corrupt the filesystem as both Phil White and
Nicolas Kowalski has experienced, it may be more advised to use mode
2002 Dec 21
2
external journal
Hello!
I have some questions about external journals.
On a 4 disk software RAID 5 I have two big devices (one 60 GB, one 180
GB). I would like to give each an external journal on a 2 disk software
RAID 1 device and use data=journal.
The journal will get its own partition with mke2fs -O journal_dev
/dev/mdwhatever.
The used 6 harddrives are all IDE drives, they are connected through
2013 Feb 06
1
Heteroscedasticity Plots
To detect heteroscedasticity for a multiple linear OLS regression (no time
dependencies):
What if the residuals vs. fitted values plot shows well behaved residuals
(cloud) - but the some of the x versus residuals plots are a megaphone?
Also, it seems that textbooks and internet tutorials in R do not agree what
is the best plot for detecting heteroscedasticity. What do you use?
I found so
2010 May 30
1
Calling fft from C
Hi
I have made a R function 'convolve2' for convolution of two real
valued vectors based on Rs 'convolve' with option type="open" - see
below.
(exp.length and irf.length are variables set in another part of the program)
I wish to implement the function convolve2 in C and use it in a
function used from R with .Call - e.g. I need to call fft in C.
All I can find in the
2006 Apr 27
1
Find a word
Dear R users,
I have the following problem: I have an array with pasted words and I woul like to know the position of the vector that have another especific word.
Let make an example:
This tis the array:
words.array<-c("RedBall","PinkBall","YellowTable","BlueBall")
And I would like to know the positions its (words.array) that have the word