search for: sub

Displaying 20 results from an estimated 12650 matches for "sub".

Did you mean: skb
2011 Apr 06
5
Need a more efficient way to implement this type of logic in R
I have cobbled together the following logic. It works but is very slow. I'm sure that there must be a better r-specific way to implement this kind of thing, but have been unable to find/understand one. Any help would be appreciated. hh.sub <- households[c("HOUSEID","HHFAMINC")] for (indx in 1:length(hh.sub$HOUSEID)) { if ((hh.sub$HHFAMINC[indx] == '01') | (hh.sub$HHFAMINC[indx] == '02') | (hh.sub$HHFAMINC[indx] == '03') | (hh.sub$HHFAMINC[indx] == '04') | (hh.sub$HHFAMINC[in...
2011 May 19
3
A better way to do this
Hello gurus, I have a dataframe containing two groups viz., 'control' and 'case', each of these groups contains longitudinal data for 100 subjects. I have to plot all these subjects on a single chart and then put a regression line for each of the group for all the subjects. I have written a function to do the chart grpcharts<-function (dat, group,group2,molecule,cutoff){ dat2<-dat[grep(group,dat$Group),] ylim=log2(c(min(dat2[,molec...
2011 Jan 04
5
scoping/non-standard evaluation issue
...wing examples: --------- snip ----------- > mod.1 <- lm(Employed ~ GNP.deflator + GNP + Unemployed + + Armed.Forces + Population + Year, data=longley) > mod.2 <- update(mod.1, . ~ . - Year + Year) > all.equal(mod.1, mod.2) [1] TRUE > > f <- function(mod){ + subs <- 1:10 + update(mod, subset=subs) + } > f(mod.1) Call: lm(formula = Employed ~ GNP.deflator + GNP + Unemployed + Armed.Forces + Population + Year, data = longley, subset = subs) Coefficients: (Intercept) GNP.deflator GNP Unemployed Armed.Forces 3.641...
2012 Oct 12
0
Samba-generated keytab fails with kinit
...have joined a HP-UX server to a Windows Server 2003 domain. Join and keytab creation were successful. The keytab entries look like this: $ klist -ek Keytab name: FILE:/etc/krb5.keytab KVNO Principal ---- -------------------------------------------------------------------------- 2 host/hostname.sub.company.net at SUB.COMPANY.NET (DES cbc mode with CRC-32) 2 host/hostname.sub.company.net at SUB.COMPANY.NET (DES cbc mode with RSA-MD5) 2 host/hostname.sub.company.net at SUB.COMPANY.NET (ArcFour with HMAC/md5) 2 host/hostname at SUB.COMPANY.NET (DES cbc mode with CRC-32) 2 host/hostna...
2018 Dec 18
2
should we do this time-consuming transform in InstCombine?
Hi, There is an opportunity in instCombine for following instruction pattern: %mul = mul nsw i32 %b, %a %cmp = icmp sgt i32 %mul, -1 %sub = sub i32 0, %a %mul2 = mul nsw i32 %sub, %b %cond = select i1 %cmp, i32 %mul, i32 %mul2 Source code for above pattern: return (a*b) >=0 ? (a*b) : -a*b; Currently, llvm(-O3) can not recognize this as abs(a*b). I initially think we could do this in instCombine phase in opt. Below is what I...
2012 Apr 10
7
How to remove $ (Dollar sign) from string
How do I remove a "$" character from a string sub() and gsub() with "$" or "\$" as pattern do not work. > sub("$","","ABC$DEF") [1] "ABC$DEF" > sub("\$","","ABC$DEF") Error: '\$' is an unrecognized escape in character string starting "\$&qu...
2005 Jan 31
2
changing the time base in a ts
...up for reasons that are obvious. How can I change the base of the seasonal time series so I can make my plots line up? That is, I want the points for the seasonal plot to line up with cycle 6 of the first plot. Thanks. dat <- ts(rnorm(12*20), start = c(1980,1), frequency = 12) plot(dat) dat.sub <- dat dat.sub[cycle(dat.sub) < 6] <- NA dat.sub[cycle(dat.sub) > 8] <- NA dat.sub <- aggregate(dat.sub, nfrequency = 1, FUN = mean, na.rm = T) tsp(dat) tsp(dat.sub) par(mfrow = c(2, 1)) plot(dat) plot(dat.sub, type = "b")
2018 Dec 18
2
should we do this time-consuming transform in InstCombine?
Hi Roman, Thanks for your good idea. I think it can solve the abs issue very well. I can continue with my work now^-^. But if it is not abs and there is no select, %res = OP i32 %b, %a %sub = sub i32 0, %b %res2 = OP i32 %sub, %a theoretically, we can still do the following transform for the above pattern: %res2 = OP i32 %sub, %a ==> %res2 = sub i32 0, %res Not sure whether we can do it in instCombine. Thanks. BRS// Chen Zheng Power Compiler Backend Developer From: Roman...
1998 Jun 19
2
problem with sub in graphs
Use of the graphical parameter 'sub' in a high level graphics function is inconsistent, and incompatible with the blue book > plot(1:10, main="test", sub="demo") Warning: parameter "sub" couldn't be set in high-level plot() function Warning: parameter "sub" couldn't be set in h...
2013 Oct 01
3
[LLVMdev] ScalarEvolution::createNodeForPHI
...------------------------------------------------------------------------; define void @foo(i32 %a, i32 %b, i32 %s) #0 { entry: %cmp = icmp sgt i32 %s, 0 %cmp15 = icmp sgt i32 %a, %b %or.cond = and i1 %cmp, %cmp15 br i1 %or.cond, label %for.body, label %if.end for.body: %i.06 = phi i32 [ %sub, %for.body ], [ %a, %entry ] tail call void @f(i32 %i.06) #2 %sub = sub nsw i32 %i.06, %s %cmp1 = icmp sgt i32 %sub, %b br i1 %cmp1, label %for.body, label %if.end if.end: ret void } ;----------------------------------------------------------------------------; I've noticed that the...
2010 Apr 02
1
All sub-summands of a vector
Hello, I'd like to take all possible sub-summands of a vector in the quickest and most efficient way possible. By "sub-summands" I mean for each sub-vector, take its sum. Which is to say: if I had the vector x<-1:4 I'd want the "sum" of x[1], x[2], etc. And then the sum of x[1:2], x[2:3], etc. And then...s...
2009 Jan 20
1
two-sample test of multinomial proportion
Hi all, This is perhaps more a statistics question than an R question, but I hope it's OK anyhow. I have some data (see below) with the number of tests positive to subtype H1 of a virus, the number of tests postive to subtype H3, and the total number of tests. This is for two different groups, and the two subtypes are mutually exclusive. What is the best way to test if the proportion of H1 tests to all positive tests differ between the two groups? I could run pr...
2011 Nov 01
3
factor level issue after subsetting
Dear list, I cannot figure out why, after sub-setting my data, that particular item which I don't want to plot is still in the newly created subset (please see example below). R somehow remembers what was in the original data set. A work around is exporting and importing the new subset. Then it's all fine; but I don't like this ide...
2013 Oct 02
0
[LLVMdev] ScalarEvolution::createNodeForPHI
...--------------------------------; > define void @foo(i32 %a, i32 %b, i32 %s) #0 { > entry: > %cmp = icmp sgt i32 %s, 0 > %cmp15 = icmp sgt i32 %a, %b > %or.cond = and i1 %cmp, %cmp15 > br i1 %or.cond, label %for.body, label %if.end > > for.body: > %i.06 = phi i32 [ %sub, %for.body ], [ %a, %entry ] > tail call void @f(i32 %i.06) #2 > %sub = sub nsw i32 %i.06, %s > %cmp1 = icmp sgt i32 %sub, %b > br i1 %cmp1, label %for.body, label %if.end > > if.end: > ret void > } > ;----------------------------------------------------------------...
2004 Jan 21
1
[g]sub behaviour with NA (PR#6451)
Full_Name: Jonathan Swinton Version: 1.9.0 OS: Windows 2000 Submission from: (NULL) (193.132.159.34) Attempting to substitute a NA causes an error in sub. > sub(x=NA,pattern="x",replacement="y") Error in sub(pattern, replacement, x, ignore.case, extended) : invalid argument > sub(x=NA,pattern=NA,replacement="y") [1] NA...
2019 Dec 23
1
Trouble using reverse dsync backup (log in successful but almost nothing happens)
...IDLE STARTTLS LOGINDISABLED XAPPLEPUSHSERVICE dsync(gerben): Debug: imapc(192.168.2.67:143): Starting SSL handshake dsync(gerben): Debug: imapc(192.168.2.67:143): SSL handshake successful, ignoring invalid certificate: SSL certificate doesn't match expected host name 192.168.2.67: No match to 2 SubjectAltNames dsync(gerben): Debug: imapc(192.168.2.67:143): Server capabilities: IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE XAPPLEPUSHSERVICE AUTH=CRAM-MD5 AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5 AUTH=GSSAPI dsync(gerben): Debug: imapc(192.168.2.67:143): Authenticating as gerben dsync(g...
2005 Jun 16
1
Sweave and sideways
...n, du mylang, nohyphenation, loaded. (C:\texmf\tex\latex\base\article.cls Document Class: article 2004/02/16 v1.4f Standard LaTeX document class (C:\texmf\tex\latex\base\size10.clo File: size10.clo 2004/02/16 v1.4f Standard LaTeX file (size option) ) \c at part=\count79 \c at section=\count80 \c at subsection=\count81 \c at subsubsection=\count82 \c at paragraph=\count83 \c at subparagraph=\count84 \c at figure=\count85 \c at table=\count86 \abovecaptionskip=\skip41 \belowcaptionskip=\skip42 \bibindent=\dimen102 ) (C:\texmf\tex\latex\sweave\Sweave.sty Package: Sweave (C:\texmf\tex\latex\base\if...
2016 Nov 07
5
should we have IR intrinsics for integer min/max?
...i - The answer to this question may help to resolve larger questions about intrinsics and vectorization that were discussed at the dev mtg last week, but let's start with the basics: Which, if any, of these is the canonical IR? ; ret = x < y ? 0 : x-y define i32 @max1(i32 %x, i32 %y) { %sub = sub nsw i32 %x, %y %cmp = icmp slt i32 %x, %y ; cmp is independent of sub %sel = select i1 %cmp, i32 0, i32 %sub ret i32 %sel } ; ret = (x-y) < 0 ? 0 : x-y define i32 @max2(i32 %x, i32 %y) { %sub = sub nsw i32 %x, %y %cmp = icmp slt i32 %sub, 0 ; cmp depends on sub, but this looks m...
2010 Nov 23
0
(no subject)
...th the ANOVA functions I've tried thus far. The experiment consists of a blocked/split-plot design, with plant biomass as the response. The following is an overview of the treatments applied (nitrogen addition, phosphorus addition, and seeded/not seeded) and at what level (block, main-plot, and sub-plot): - 6 experimental blocks divided into 2 main-plots - each main-plot divided into 8 sub-plots, for a total of 96 sub-plots (6 blocks * 2 main-plots * 8 sub-plots) - 16 experimental treatment conditions in a 4 x 2 x 2 factorial design: - N at 4 levels for each sub-plot - P at 2 levels fo...
2003 Jun 22
1
Using weighted.mean() in aggregate()
Dear R users, I have a question on using weighted.mean() while aggregating a data frame. I have a data frame with columns Sub, Length and Slope: > x[1:5,] Sub Length Slope 1 2 351.547 0.0025284969 2 2 343.738 0.0025859390 3 1 696.659 0.0015948968 4 2 5442.338 0.0026132544 5 1 209.483 0.0005304225 and I would like to calculate the weighted.mean of Slope, using Length as weights, for each valu...