search for: subtracts

Displaying 20 results from an estimated 1814 matches for "subtracts".

Did you mean: subtract
2011 May 25
1
Subtracting rows by id
Dear R users, I have two datasets: id1 <- c(rep(1,10), rep(2,10), rep(3,10)) value1 <- sample(1:100, 30, replace=TRUE) dataset1 <- cbind(id1,value1) id2 <- c(1,2,3) subtract.value <- c(1,3,5) dataset2 <- cbind(id2, subtract.value) I want to subtract the number of rows in the subtract.value that corresponds to the id value in dataset1. So for the 1 in id1, I want to
2005 Nov 15
2
Subtracting timeseries objects
Sorry to keep posting but I want to do this right and I'm hoping for some pointers I now have two time series objects which I need to subtract. Unfortunatly the two series dont have the same sample rates. When I try to subtract them avgSub<-avg1-avg2 The time series object is clever enough to object. So I guess I need to write a function for subtraction of the time series objects which
2012 Sep 20
4
[PATCH 0/3] tsc adjust implementation for hvm
....3. CPUID.7.0.EBX[1]=1 indicates TSC_ADJUST MSR 0x3b is supported. Basically it is used to simplify TSC synchronization, operation of IA32_TSC_ADJUST MSR is as follows: 1). On RESET, the value of the IA32_TSC_ADJUST MSR is 0; 2). If an execution of WRMSR to the IA32_TIME_STAMP_COUNTER MSR adds (or subtracts) value X from the TSC, the logical processor also adds (or subtracts) value X from the IA32_TSC_ADJUST MSR; 3). If an execution of WRMSR to the IA32_TSC_ADJUST MSR adds (or subtracts) value X from that MSR, the logical processor also adds (or subtracts) value X from the TSC; With i...
2019 Jan 14
4
Reducing the number of ptrtoint/inttoptrs that are generated by LLVM
...- >> >> By defining pointer subtraction intrinsic, we can get performance gain >> because it gives more undefined behavior than just subtracting two >> ptrtoints. >> >> Patch https://reviews.llvm.org/D56598 adds llvm.psub(p1,p2) intrinsic >> function, which subtracts two pointers and returns the difference. Its >> semantic is as follows. >> If p1 and p2 point to different objects, and neither of them is based on >> a pointer casted from an integer, `llvm.psub(p1, p2)` returns poison. For >> example, >> >> %p = alloca >>...
2011 Jan 25
4
Subtracting elements of data.frame
Dear R helpers I have a dataframe as df = data.frame(x = c(1, 14, 3, 21, 11), y = c(102, 500, 40, 101, 189)) > df    x   y 1  1 102 2 14 500 3  3  40 4 21 101 5 11 189 # Actually I am having dataframe having multiple columns. I am just giving an example. I need to subtract all the rows of df by the first row of df i.e. I need to subtract each element of 'x' column by 1. Likewise I
2019 Jan 15
2
Reducing the number of ptrtoint/inttoptrs that are generated by LLVM
...subtraction intrinsic, we can get performance gain >>>> because it gives more undefined behavior than just subtracting two >>>> ptrtoints. >>>> >>>> Patch https://reviews.llvm.org/D56598 adds llvm.psub(p1,p2) intrinsic >>>> function, which subtracts two pointers and returns the difference. Its >>>> semantic is as follows. >>>> If p1 and p2 point to different objects, and neither of them is based >>>> on a pointer casted from an integer, `llvm.psub(p1, p2)` returns poison. >>>> For example, >&g...
2011 Jul 27
2
Elegant way to subtract matrix from array
there are really two related problems here I have a 2D matrix A <- matrix(1:100,nrow=20,ncol =5) S <- matrix(1:10,nrow=2,ncol =5) #I want to subtract S from A. so that S would be subtracted from the first 2 rows of #A, then the next two rows and so on. #I have a the same problem with a 3D array # where I want to subtract Q for every layer (1-10) in Z # I thought I solved this one
2019 Jan 14
7
Reducing the number of ptrtoint/inttoptrs that are generated by LLVM
...ll introduce llvm.psub patch first. --- Adding llvm.psub --- By defining pointer subtraction intrinsic, we can get performance gain because it gives more undefined behavior than just subtracting two ptrtoints. Patch https://reviews.llvm.org/D56598 adds llvm.psub(p1,p2) intrinsic function, which subtracts two pointers and returns the difference. Its semantic is as follows. If p1 and p2 point to different objects, and neither of them is based on a pointer casted from an integer, `llvm.psub(p1, p2)` returns poison. For example, %p = alloca %q = alloca %i = llvm.psub(p, q) ; %i is poison This allows...
2009 Oct 25
2
row subtraction
I don't know if there is a way to do this in R but I want to subtract within the same column from different rows. I want to subtract c(r)-c(r-1) and continue down the column until they are all calculated and form another column. Again I don't know if R can do this but I thought I would ask. Thanks either way
2019 Jan 14
2
Reducing the number of ptrtoint/inttoptrs that are generated by LLVM
...- >> >> By defining pointer subtraction intrinsic, we can get performance gain >> because it gives more undefined behavior than just subtracting two >> ptrtoints. >> >> Patch https://reviews.llvm.org/D56598 adds llvm.psub(p1,p2) intrinsic >> function, which subtracts two pointers and returns the difference. Its >> semantic is as follows. >> If p1 and p2 point to different objects, and neither of them is based on >> a pointer casted from an integer, `llvm.psub(p1, p2)` returns poison. For >> example, >> >> %p = alloca >>...
2012 Oct 30
3
subtract a time period from a date
Hello everybody, how can I reduce e.g. 30 days from a date? When I do the following "2011-05-01 CEST" -"2011-04-01 CEST" I get: "Time difference of 30 days" an thats fine. But when I try "2011-05-01 CEST" - 30 I get nonsense. So how can I subtract some days, month or years from a date? thanking you in anticipation Claudia Paladini
2012 Nov 19
6
loop to subtract arrays / error
Hi everyone, I am having trouble with creating a loop to subtract arrays. In R, this is what I have done: > Vobsr <- read.csv("Observed_Flow.csv", header = TRUE, sep =",") # see data > below > Vsimr <- read.csv("1000Samples_Vsim.csv", header = TRUE, sep =",") # see > data below > Vobsr <- as.matrix(Vobsr[,-1]) # remove column 1 from
2012 May 07
5
Subtracting a matrix 1x28 from a scalar
Afternoon- I am trying to subtract a matrix, basically a vector of 28 values, each by the same number to account for differences in regression fitting. I am taking the 1x28 and minus it by the mean value of the matrix, each number. The result I receive is a 1X29 matrix. Does anyone know why the result has an extra value? > lffeb_march [1] 6.588926 7.663877 6.917706 6.824374 7.029973
2012 Mar 29
2
subtract a list of vectors from a list of data.frames in an elegant way
Dear R experts, I've realized that it might not be possible to define a negative SELCET statement in a SQL call so now I'm looking for the smoothest way to generate a list of what I would like from my large database by first pulling all the names with a query like this "SELECT top 1 * FROM your_table" (thank you Bart Joosen for the idea) and then subtract the variables I am not
2019 Jan 15
2
Reducing the number of ptrtoint/inttoptrs that are generated by LLVM
...subtraction intrinsic, we can get performance gain >>>> because it gives more undefined behavior than just subtracting two >>>> ptrtoints. >>>> >>>> Patch https://reviews.llvm.org/D56598 adds llvm.psub(p1,p2) intrinsic >>>> function, which subtracts two pointers and returns the difference. Its >>>> semantic is as follows. >>>> If p1 and p2 point to different objects, and neither of them is based >>>> on a pointer casted from an integer, `llvm.psub(p1, p2)` returns poison. >>>> For example, >&g...
2008 Jan 29
2
add/subtract matrices, ignoring NA or missing values
Hi, For example, given two 2x2 matrices m1 and m2. I would like to add/subtract element by element > m1 [,1] [,2] [1,] NA NA [2,] 1 2 > m2 [,1] [,2] [1,] 1 NA [2,] NA 2 > m1 + m2 [,1] [,2] [1,] NA NA [2,] NA 4 How can I ignore the NA, and get this ? Hope the solution can be extended to subtract and modulo also. [,1] [,2]
2008 May 07
3
use list elements to subtract values from the dataframe
Hi, I have a dataframe wf existing of a header with different labels and beneath the values of those labels : wf: label1 label2 ... 0,45 0,21 0,10 0,45 .... .... I have a list fl <- c("label2","label3",..) Isn't possible to use the list elements in the list in order to subtract values from the dataframe? like : wf$fl[[1]] When I do in R I get :NULL
2008 Apr 10
2
subtract the mean from each column
Hi, I am new to R an dI need some help I have a matrix of real values 100*300 and I would like to calculate the mean for each column , then for each entry in a column i need to subtract the mean so I will have a matrix where the columns have zero mean. any one know how to do that . Thanks -- View this message in context:
2013 Jan 14
1
hwo to subtract a child array from the big array?
hi R users I have a data set with the name AA AA<-1:100 Now I want to get a child array from AA every 10 numbers e.g. ab =c(10,20,30,40,50,60,70,80,100) How could I subtract aa from AA? thank you . -- TANG Jie Email: totangjie@gmail.com Tel: 0086-2154896104 Shanghai Typhoon Institute,China [[alternative HTML version deleted]]
2013 Sep 10
1
Subtracting elements of a vector from each other stepwise
I am trying to figure out how to create a loop that will take the difference of each member of a vector from each other and also spit out which one has the least difference. I do not want the vector member to subtract from itself or it must be able to disregard the 0 obtained from subtracting from itself. For example: x = c(17,19,23,29) 1. abs(x-x[1]) = (0, 2, 6, 12) 2. abs(x-x[2]) = (2, 0,