search for: abs

Displaying 20 results from an estimated 4769 matches for "abs".

Did you mean: abi
2013 Mar 22
3
Distance calculation
...is what you wanted. dat1<-read.csv("peaks.csv",sep=",") #Subset dat2<-dat1[1:5,] res1<-do.call(cbind,lapply(seq_len(nrow(dat2)),function(i) do.call(rbind,lapply(split(rbind(dat2[i,],dat2[-i,]),1:nrow(rbind(dat2[i,],dat2[-i,]))), function(x) {x1<-rbind(dat2[i,],x); abs((x1$Peak1.v.[1]-x1$Peak1.v.[2])*(x1$Peak1.t.[1]-x1$Peak1.t.[2]))+abs((x1$Peak2.v.[1]-x1$Peak2.v.[2])*(x1$Peak2.t.[1]-x1$Peak2.t.[2]))+abs((x1$Npeak1.v.[1]-x1$Npeak1.v.[2])*(x1$Npeak1.t.[1]-x1$Npeak1.t.[2]))+abs((x1$Npeak2.v.[1]-x1$Npeak2.v.[2])*(x1$Npeak2.t.[1]-x1$Npeak2.t.[2]))})))) res2<-do.ca...
2001 Jun 12
1
cophenetic matrix
...belonging to the differents clusters merged. ## If you look at hc$merge, you see that a negative value correspond ## to an object and a positive value to a node. for(i in 1:(long-1)){ if(i == 1){ if((nodal[i,1] < 0) && (nodal[i,2] < 0)){ noeud <- list(c(abs(nodal[i,1]),abs(nodal[i,2]))) distarbre[as.integer(abs(nodal[i,1])),as.integer(abs(nodal[i,2]))] <- nodal[i,3] distarbre[as.integer(abs(nodal[i,2])),as.integer(abs(nodal[i,1]))] <- nodal[i,3] } if(((nodal[i,1] < 0) && (nodal[i,2] > 0)) || (nodal[i,...
2012 Sep 26
1
Change in order of names after applying "plyr" package
Dear R helpers I have following two data.frames viz. equity_data and param. equity_data = data.frame(security_id = c("Air", "Air", "Air", "Air", "Air", "Air", "Air", "Air", "Air", "Air", "Air", "Air", "AB", "AB", "AB", "AB",
2009 Dec 28
0
cannot receive new filesystem stream: invalid backup stream
I have two snv_126 systems. I''m trying to zfs send a recursive snapshot from one system to another: # zfs send -v -R tww/opt/chroots at backup-20091225 |\ ssh backupserver "zfs receive -F -d -u -v tww" ... found clone origin tww/opt/chroots/ab at ab-1.0 receiving incremental stream of tww/opt/chroots/ab-1.0 at backup-20091225 into tww/opt/chroots/ab-1.0 at
2010 May 18
2
Counting Frequencies in Data Frame
Hi, I am sure there is an easy way to do it, but I can't find it. I have a data frame that has 15 columns and 7000 rows. The only values inside the data.frame are "aa", "ab", "bb" as you can see an example bellow. 1 2 3 1 aa ab ab 2 ab ab ab 3 aa aa aa 4 bb bb bb What I would like to do, is to generate a vector (or another data.frame) with 7000 rows, and 3
2005 Apr 19
3
Help with predict.lm
Hi I have measured the UV absorbance (abs) of 10 solutions of a substance at known concentrations (conc) and have used a linear model to plot a calibration graph with confidence limits. I now want to predict the concentration of solutions with UV absorbance results given in the new.abs data.frame, however predict.lm only appe...
2009 Dec 17
2
segfault in glm.fit (PR#14154)
Bug summary: glm() causes a segfault if the argument 'data' is a data frame with more than 16384 rows. Bug demonstration: -------input --------------- N <- 16400 df <- data.frame(x=runif(N, min=1,max=2),y=rpois(N, 2)) glm(y ~ x, family=poisson, data=df) ------ output --------------- *** caught segfault *** address (nil),
2011 Aug 18
2
Selecting subset of factor levels
Dear r-help, I would like to select a subset of levels from a factor variable in a data frame and return a data frame. The data set consists of 3 variables, 2 of which are factors (Site, Fish) and one numeric (Datavalue) as follows: Site Fish Datavalue AB 2-1 2.3 AB 2-1 2.4 AB 2-1 2.2 AB 2-2 2.6 AB 2-2 2.5 AB 2-2 2.7 AB 2-3
2013 May 10
2
How can I extract part of the data with a selection criterion?
Hi, As an example, how can I get the data such that field a of ab, ab["a"], equals 3? I expect the answer to be the union of 2 and 4, as Thanks, > a<-c(1,3,4,3,5,6,5) > b<-c(2,4,6,7,3,1,2) > ab<-data.frame(a,b) > ab a b 1 1 2 2 3 4 3 4 6 4 3 7 5 5 3 6 6 1 7 5 2 > ab[a==3] Error in `[.data.frame`(ab, a == 3) : undefined columns selected >
2011 Jul 28
2
Animated gif or something similar in R?
...utput to a animated gif or some other format that could be used in a powerpoint type presentation? I work with a bunch of 'drama queens'--they'd like it if there was some motion rather than a static display ;-) Thanks in advance, Dale. library(rgl) clusset<-data.frame(x=c(round(abs(rnorm(5,7,1)),1),round(abs(rnorm(5,11,2)),1), round(abs(rnorm(5,16,2)),1),round(abs(rnorm(5,20,1.5)),1),round(abs(rnorm(5,5,2)),1)), y=c(round(abs(rnorm(5,7,2)),1),round(abs(rnorm(5,11,2)),1), round(abs(rnorm(5,16,2)),1),roun...
2013 Feb 27
2
matrix multiplication
Hi, Try this: #mat1 is the data res<-do.call(cbind,lapply(seq_len(nrow(mat1)),function(i) {new1<-do.call(rbind,lapply(seq_len(nrow(mat1[-i,])),function(j) {x1<-rbind(mat1[i,],mat1[j,]); x2<-(abs(x1[1,1]-x1[2,1])*abs(x1[1,5]-x1[2,5]))+(abs(x1[1,2]-x1[2,2])*abs(x1[1,6]-x1[2,6]))+(abs(x1[1,3]-x1[2,3])*abs(x1[1,7]-x1[2,7]))+(abs(x1[1,4]-x1[2,4])*abs(x1[1,8]-x1[2,8]))}));new1})) head(res,3) #??? [,1]?? [,2]?? [,3]?? [,4]?? [,5]?? [,6]?? [,7]?? [,8]?? [,9]? [,10] #[1,]????? 0? 79745 146483? 4087...
2008 Jul 23
1
R2WinBUGS problem
Dear friends - I'm on winXP, R 2.71 - I have with some help dveloped this multivariate normal model, which gives very plausible results in WinBUGS even without any initial values specified. However, when I then try to run the same model via the bugs function in R2WinBUGS with inits specified as inits=NULL the program stops in a dead end. So I have tried to make inits for the bugs function
2011 Apr 28
1
AutomaticTRUE/FALSE Matrix Generation
Dear All, I am a newbee in R an have the following problem. I have variables AB,BC,CD to which outputs are assigned. Now AB[,1], for example, outputs a list, which is a random combination of the following characters: "AB", "BC", "CD". What I want to do is to build a 3x3 matrix with colnames and rownames equal to "AB", "BC", "CD". Matrix
2019 Sep 11
4
Fw: Calling a LAPACK subroutine from R
Sorry for cross-posting, but I realized my question might be more appropriate for r-devel... Thank you, Giovanni ________________________________________ From: R-help <r-help-bounces at r-project.org> on behalf of Giovanni Petris <gpetris at uark.edu> Sent: Tuesday, September 10, 2019 16:44 To: r-help at r-project.org Subject: [R] Calling a LAPACK subroutine from R Hello R-helpers!
2011 May 01
1
Urgent: conditional formula for nls
...d y both with 179 observations. I'm trying to fit a nonlinear model with five parameters using nls. The formula is only defined within a range of x-values, it should be zero otherwise, thus my attempted use of ifelse: > df<-data.frame(x,y) > nlsfit<-nls(y~ifelse(x>m&x<m+abs(s),abs(a)*d*abs(s)*exp(-(1/2)*(g+d*log((x-m)/(-x+m+abs(s)))^2))/(sqrt(2*pi)*(x-m)*(-x+m+abs(s))),0),data=df,start=list(a=0.37,g=0,d=1,m=0.42,s=0.24)) Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates In addition: Warning messages: 1: In log((x -...
2019 Sep 11
4
Fw: Calling a LAPACK subroutine from R
Berend, I do not think this works with gfortran 7+. I am calling the BLAS subroutine dgemv from Fortran code in my package eha, and the check (with R-devel) gives: gmlfun.f:223:1: warning: type of ?dgemv? does not match original declaration [-Wlto-type-mismatch] & score, ione) ^ /home/gobr0002/R/src/R-devel/include/R_ext/BLAS.h:107:1: note: type mismatch in parameter 12
2019 Sep 10
2
Calling a LAPACK subroutine from R
Hello R-helpers! I am trying to call a LAPACK subroutine directly from my R code using .Fortran(), but R cannot find the symbol name. How can I register/load the appropriate library? > ### AR(1) Precision matrix > n <- 4L > phi <- 0.64 > AB <- matrix(0, 2, n) > AB[1, ] <- c(1, rep(1 + phi^2, n-2), 1) > AB[2, -n] <- -phi > round(AB, 3) [,1] [,2] [,3]
2019 Sep 10
2
Calling a LAPACK subroutine from R
Hello R-helpers! I am trying to call a LAPACK subroutine directly from my R code using .Fortran(), but R cannot find the symbol name. How can I register/load the appropriate library? > ### AR(1) Precision matrix > n <- 4L > phi <- 0.64 > AB <- matrix(0, 2, n) > AB[1, ] <- c(1, rep(1 + phi^2, n-2), 1) > AB[2, -n] <- -phi > round(AB, 3) [,1] [,2] [,3]
2003 May 14
4
[Bug 47] conntrack breaks nfs, corrupted packets
https://bugzilla.netfilter.org/cgi-bin/bugzilla/show_bug.cgi?id=47 ------- Additional Comments From kaber@trash.net 2003-05-14 02:39 ------- I've captured some non-fragmented tcp packets which show this behaviour with 2.4.21-rc2. They look badly damaged. The destination ip doesn't match the mac but they come from valid connections. Setting interface mtu to 1486 helps which makes me
2008 Dec 09
3
== operand
Hi,   I am trying to compare two values using "==" operand, please take a look of the following example (I copied ALL what I did here without deleting any line)   >    bb<-1 > cc<-50 > cc==abs(bb+52) [1] FALSE > C<-53 > C<-53 > c<-53 > cc==abs(bb+52) [1] FALSE              I am expecting to see a TRUE here. Then I tried another way,   > abs(1+52) [1] 53 > cc==abs(1+52) [1] FALSE Why it is FALSE. Then I tried > d<-abs(b+52) Error: object "b"...