similar to: how to cut a multidimensional array along a chosen dimension and store each piece into a list

Displaying 20 results from an estimated 600 matches similar to: "how to cut a multidimensional array along a chosen dimension and store each piece into a list"

2018 Oct 05
2
Seg fault stats::runmed
Dear all, I just found this issue: dd1 = c(rep(NaN,82), rep(-1, 144), rep(1, 74)) xx = runmed(dd1, 21) -> R crashes reproducibly in R 3.4.3, R3.4.4 (Ubuntu 14.04/Ubuntu 16.04) With GDB: Program received signal SIGSEGV, Segmentation fault. swap (l=53, r=86, window=window at entry=0xc59308, outlist=outlist at entry=0x12ea2e8, nrlist=nrlist at entry=0x114fdd8, print_level=print_level at
2011 Feb 17
1
cv.glmnet errors
Hi, I am trying to do multinomial regression using the glmnet package, but the following gives me an error (for no reason apparent to me): library(glmnet) cv.glmnet(x=matrix(c(1,2,3,4,5,6,1,2,3,4,5,6), nrow=6),y=as.factor(c(1,2,1,2,3,3)),family='multinomial',alpha=0.5, nfolds=2) The error i get is: Error in if (outlist$msg != "Unknown error") return(outlist) : argument is of
2010 Jun 02
2
glmnet strange error message
Hello fellow R users, I have been getting a strange error message when using the cv.glmnet function in the glmnet package. I am attempting to fit a multinomial regression using the lasso. covars is a matrix with 80 rows and roughly 4000 columns, all the covariates are binary. resp is an eight level factor. I can fit the model with no errors but when I try to cross-validate after about 30 seconds
2012 Nov 29
0
Simper analysis with Morisita-Horn
Dear ecology fellows, I tried to implement Morisita-Horn distance (instead of Bray that is in the current version) in the code for the Simper analysis in vegan. I would be very grateful if someone can check if the code is right. function (comm, group, ...) { if (any(rowSums(comm, na.rm = TRUE) == 0)) warning("you have empty rows: results may be meaningless")
2018 Oct 05
0
Seg fault stats::runmed
>>>>> Hilmar Berger >>>>> on Fri, 5 Oct 2018 10:17:49 +0200 writes: > Dear all, I just found this issue: > I just found this issue: > dd1 = c(rep(NaN,82), rep(-1, 144), rep(1, 74)) > xx = runmed(dd1, 21) >> R crashes reproducibly in R 3.4.3, R3.4.4 (Ubuntu 14.04/Ubuntu 16.04) and also in the latest development version
2010 Aug 20
3
change object name within for loop
Hi, I am writing a for loop that creates one object, say 'outn' on every round of the loop. I would like the name of each object to include the index of the loop as in, for example: out1, out2, out3, ... And I would like the naming of the object to take place automatically as the loop moves through? Similarly, I would like to be able to call different objects (in1, in2, in3,
2007 Apr 11
5
how to reverse a list
Hi, there: I am wondering if there is a quick way to "reverse" a list like this: t0 <- list(a=1, b=1, c=2, d=1) reverst t0 to t1 > t1 $`1` [1] "a" "b" "d" $`2` [1] "c" thanks. -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..." ---Matrix III
2009 Mar 08
2
samsung sata disk pb
Hi there, I'm running a centos 5.2 (with a centos 5.3 kernel) on a box with a samsung 1To green edition, and this disk looks a bit slow to me and it's not recognized by hdparm : # hdparm -iI /dev/sda /dev/sda: HDIO_GET_IDENTITY failed: Invalid argument HDIO_DRIVE_CMD(identify) failed: Invalid argument # hdparm -tT /dev/sda /dev/sda: Timing cached reads: 2252 MB in 2.00 seconds =
2009 Nov 24
5
Split column
Hello, R users, I have a dataset that looks like this: id var1 var2 1 1 3 2 3 1 3 2 1 4 1 2 5 2 3 I want to split one column to two columns with 1 = 1 and 1, 2 = 1 and 2, 3 = 2 and 2: id var1.1 var1.2 var2.1 var2.2 1 1 1 2 2 2 2 2 1 1 3 1 2
2011 Dec 07
1
Output table from for loop
Hi, this might be basic but can't get it to work and it is hampering my R usage: #the loop is checking variance of rows, and cutting out rows with var>numVec[i] #I define outMat as object names I want to output to (does this make sense? how else #can I define sequential numbered output?) #numVec is numbers I use in the loop head(Counts) AN1 AN2 AN3 AN4 var GENE1
2010 Dec 09
1
Number of dimension in Multidimensional Scaling
Hello! Very often one can hear that MDS usually ends with two-dimensional solution. Of course, there are methods, like Scree-test (proposed by Kruskal and Wish, 1981), to determine optimal number of dimensions. However, I am trying to find references to this two-dimensional gold-standard. Can anyone point me to authors which explicitly states that two-dimensions are typical and easiest to
2008 Nov 05
2
access (exactly/only) one dimension of a multidimensional table
Dear list, I have a multi(3)dimensional table, which is printed as two tables: > table.a , , = female not at all a little medium heavy no 53 27 8 6 yes 30 67 61 66 , , = male not at all a little medium heavy no 31 20 11 5 yes 5 19 34 25 How can I access (manipulate)
2012 Jul 13
1
integrating multi-dimensional dat along one dimension
I just want to integrate a 3D data set along one dimension to obtain a 2D data set. Something like: (given array "d" with dim nx,ny,nz ...) data_int<-array(dim=c(nx,ny)) for (n in 1:ny) { for (m in 1:nx) { data_int[m,n]<-sum(d[m,n,]) } } The thing is, given R's facility with integers, it seems that I should be able to obtain data_int without the
2011 Jul 14
1
Yes/No Pedantic Patch
Hello developers. I have made a yes/no 'pedantic' patch that affects how ssh command line and other agents that employ yes/no prompts interpret results. The nature of the patch is the following: When prompted with things like: ----SNIP---- ./ssh localhost The authenticity of host 'localhost (127.0.0.1)' can't be established. RSA key fingerprint is
2019 Apr 10
4
Feasibility of cling/llvm interpreter for JIT replacement
Dear Sir/Madam Our company, 4Js software, has developed an SQL data base software that runs under different operating systems: Windows, Linux, Mac OS X. This software compiles each SQL statement into a C program that is compiled "on the fly" and executed by our JIT, Just In Time compiler. We wanted to port it to Apple's iOS, and spent a lot of time retargetting the JIT for
2009 May 14
1
KNN script: Identity of specific K samples chosen?
I am currently doing some prediction work using the knn script in the 'class' package. Does anyone know a way of having R return the IDs (sample IDs, or column IDs of the training matrix) of the 'k' samples that are chosen by the algorithm as being nearest to a given test sample? I have searched/read everything I can about the script, however have not found anything other than the
2005 Oct 19
1
WINS 1c query, many responses: who is chosen?
Scenario (everything samba-3): - many subnets, each with a BDC - one PDC somewhere else - one WINS at that PDC server - windows using wins first, bcast next (node-type 8) When one workstation asks the wins server about the <1c> netbios name type, the server will answer with the PDC and BDCs IP. What prevents the workstation from using a controller outside its subnet? Is this
2010 Jun 08
1
Problems with Blood 2 - The Chosen
Hi, I just tried to get Blood 2 running on my Crunchbang Machine with WineHQ 1.0.1. I didn't encounter any problems during the intallation. But when I started the installed game some issues occured. 1st: When I'm in the configuration menu and try to change the keyboard settings, the ENTER-key stayes pressed constantly so that I can't change the key mappings as I'd wish to. 2nd:
2009 Feb 12
1
remember chosen label and re-use for next boot
Hi, I have just converted from grub (legacy) and am now using extlinux, which makes me a very happy camper by the way :-) There is one thing I am missing though, grub has the possibility to remember the chosen label and re-use that as default for the next boot. Is there something I missed in the documentation (would not be the first time ;-)) or is such a feature intentionally left out? I
2010 Jan 31
1
permutation analysis with randomly chosen subsets of a matrix
Hello, here is the problem: I want to demonstrate that, on average, the Pearson's correlations of a specified subset of genes from a huge list (>18,000 columns) are higher than any randomly chosen subset of that list. I would therefore like to do a number of tests between that specified subset and randomly chosen ones from the "mother" list. How could I do that? What would be