similar to: Summing over specific columns in a matrix

Displaying 20 results from an estimated 1400 matches similar to: "Summing over specific columns in a matrix"

2011 Jan 10
5
Changing a logical matrix into a numeric matrix
Hi, I would like to turn my TRUE/FALSE matrix into a 1/0 matrix (i.e. True=1 and False=0) [,1] [,2] [,3] [1,] TRUE FALSE FALSE [2,] TRUE TRUE FALSE [3,] TRUE TRUE TRUE [,1] [,2] [,3] [1,] 1 0 0 [2,] 1 1 0 [3,] 1 1 1 Is there a quick way of doing this without a loop? Thanks Emma -- View this message in context:
2010 Nov 04
2
Matrix Manipulation
Hi, Is there a quick way to go from this matrix: > A [,1] [,2] [,3] [1,] 1 1 1 [2,] 2 2 2 [3,] 3 3 3 [4,] 4 4 4 [5,] 5 NA 5 [6,] NA NA 6 [7,] NA NA NA to this matrix: > B [,1] [,2] [,3] [1,] 1 NA NA [2,] 2 NA 1 [3,] 3 1 2 [4,] 4 2 3 [5,] 5 3 4 [6,] NA 4 5 [7,] NA NA 6
2011 Jan 06
5
How to join matrices of different row length from a list
Hi, I have several matrix in a list, for example: e [[1]] [,1] [,2] [1,] 1 3 [2,] 2 4 [[2]] [,1] [,2] [1,] 1 4 [2,] 2 5 [3,] 3 6 [[3]] [,1] [,2] [1,] 2 1 I would like to join them by column i.e. [,1] [,2] [,3] [,4][,5] [,6] [1,] 1 3 1 4 2 1 [2,] 2 4 2 5 NA NA [3,] NA NA 3 6 NA NA I have tried
2009 Apr 14
4
cbind
I have a list of numbers with NAs as below: > A[,1] [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [19] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [37] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [55] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [73] NA NA NA 62 78 98
2008 Dec 03
1
Function output difficulties
is there anyway for some parts of the function output to not be returned, even if the output has been used to calculate a further part of the function? i have tried invisible() to no avail. Thanks Emma -- View this message in context: http://www.nabble.com/Function-output-difficulties-tp20813117p20813117.html Sent from the R help mailing list archive at Nabble.com.
2016 Dec 09
4
trouble installing centos 6.8
Dear all, I'm having trouble installing Centos 6.8, in a VM using VirtualBox, and hoping that someone on this distribution can help. I'm running VirtualBox Version 5.1.4 r110228 (Qt5.5.1). I downloaded .iso files for Centos 6.8: - CentOS-6.8-x86_64-bin-DVD1.iso - CentOS-6.8-x86_64-bin-DVD2.iso I proceeded to set up a new VM, selecting Linux / RedHat 64 bit. I selected the DVD1 iso
2010 Nov 30
2
excluding factors from sampling
Hello, I am trying to write a function that first requires randomly sampling items from a set of factors. I need to be able to sample from that same set of factors, but exclude the ones that have already been sampled previously. For example, suppose I have a set of items a-j (a,b,c,d,e,f,g,h,i, and j) and randomly sample a, c, and f from that group. How do I sample again from the larger group
2016 Dec 09
3
trouble installing centos 6.8
On Fri, 9 Dec 2016 12:46:11 -0700 Emma M Birath wrote: > > I proceeded to set up a new VM, selecting Linux / RedHat 64 bit. I > > selected the DVD1 iso file above as "IDE Primary Master" and the DVD2 > > as "IDE Secondary Master". I have personally always had the best luck by installing the Live CD, and then customizing the installation from there. This
2009 Mar 11
3
Mixed models fixed effects
Dear All, This may sound like a dumb question but I am trying to use a mixed model to determine the predictors of bat activity along hedges within 8 sites. So my response is continuous (bat passes) my predictors fixed effects are continuous (height metres), width (metres) etc and the random effect is site - can you tell me if the fixed effects can be continuous as all the examples I have
2020 Sep 04
4
Acls
Hi I have some problems with setting permissions on my share. I think it has to do that I didn?t configure this If you use the winbind 'ad' backend on Unix domain members and you add a gidNumber attribute to the Domain Admins group in AD, you will break the mapping in idmap.ldb. Domain Admins is mapped as ID_TYPE_BOTH in idmap.ldb, this is to allow the group to own files in Sysvol on a
2008 Dec 05
3
Logical inconsistency
Dear colleagues Please could someone kindly explain the following inconsistencies I've discovered when performing logical calculations in R: 8.8 - 7.8 > 1 > TRUE 8.3 - 7.3 > 1 > TRUE Thank you, Emma Jane [[alternative HTML version deleted]]
2005 Sep 21
3
Multiple density plots on 1 graph
I want to overlay 50 denisty plots on a single plot. For each plot there are 10,000 data points and i want the empirical density of the data. I have not been able to find an easy way to achieve this (I have scoured the manula and website so sorry if I missed it!), does anyone have any suggestions? Thankyou.
2003 Jun 20
1
User can delete file when they have no read/write access
Im haveing a problem with my profiles share on my Samba 2.2.3 PDC server. I have a share like this: [profiles] path = /home/samba/profiles writeable = yes create mask = 0700 directory mask = 0700 browsable = no valid users = root,@smbusers The roaming profile works just fine with windows2k, and the users can't read the other profiles (they get a "access
2020 Jun 03
2
Fwd: I cannot change value of global variable in LLVM IR using IRBuilder
I don't think it's the same problem as you described. By printing I meant calling printf function and passing my global variable as one of the arguments. My code: Instruction* InstructionVisitor::incrementGlobalKey(Instruction* I) { IRBuilder<> Builder(I->getContext()); Builder.SetInsertPoint(I->getNextNode()); GlobalVariable* key =
2002 Mar 07
2
Access denied error
I have installed SAMBA (latest version) on my solaris machine, and I have gone through all the specified steps to configure it. I am trying to view the share (just "home") from a DOS window in Windows 2000, using : > net view \\myUNIXbox and am getting : System Error 5 has occurred. Access is denied Any suggestions greatly appreciated. Please reply to me at
2011 Dec 07
1
using sample
Hi, Can anyone help sort out the problem with the following script - I am a R newbie and I am self taught. obs.all = c() for(i in 1:386){ if (n.sim[i]>0){ obs = (1:133429)[event.details[,2] == i] obs.all = c(obs.all, sample(obs[obs < n.sim[i]], size = n.sim[i], replace=T)) } Basically, in the sample bit, I only want to get obs.all if the value of
2011 Dec 13
2
Generating input population for microsimulation
Hi all, I've been struggling with some code and was wondering if you all could help. I am trying to generate a theoretical population of P people who are housed within X different units. Each unit follows the same structure- 10 people per unit, 8 of whom are junior and two of whom are senior. I'd like to create a unit ID and a unique identifier for each person (person ID, PID) in the
2020 Jun 03
2
Fwd: I cannot change value of global variable in LLVM IR using IRBuilder
Hi Everyone, I'm quite new to LLVM and I want to update value of global variable in LLVM IR. I created new global variable in ModulePass: bool runOnModule(llvm::Module &M) { IRBuilder<> Builder(M.getContext()); Instruction *I = &*inst_begin(M.getFunction("main")); Builder.SetInsertPoint(I); M.getOrInsertGlobal("globalKey",
2008 Jun 27
5
Wheel and YUM!!
Dear All I am trying to allow a local user on the centos machine to be able to run yum What I have done is added him to the wheel group so that he can run software, basically it's his own machine if he breaks it it's his problem But even after adding him to wheel, sys and adm group he is unable to install using yum I am sure I must be missing something or I must be doing
2023 Sep 22
1
[PATCH 6/9] drm/vc4: Annotate struct vc4_perfmon with __counted_by
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). As found with Coccinelle[1], add __counted_by for struct vc4_perfmon. [1]