similar to: How can pairs of values be stored in a 2D matrix ?

Displaying 20 results from an estimated 10000 matches similar to: "How can pairs of values be stored in a 2D matrix ?"

2017 Jun 23
0
R version 3.3.2, Windows 10: Applying a function to each possible pair of rows from two different data-frames
You appear to be trying to write C code in R. Don't do this. If you can trade off space for efficiency, the calculation can be easily vectorized (assuming I correctly understand what you want to do, of course). set.seed(135) ## for reproducibility D1<-data.frame(x=1:5,y=6:10,z=rnorm(5)) D2<-data.frame(x=19:30,y=41:52,z=rnorm(12)) D.all <-merge(D1,D2, by.x=NULL,by.y=NULL) ##
1999 May 06
1
x,y vs row,column
I think my problems are coused by a fundamental R incompatibility in how matrices are stored and the usual way of specifying Cartesian coordinates. When I do data<-read.table("~/r/rt/data/unif/6cbcif2d.out",header=TRUE) x<-unique(data$lag1) y<-unique(data$lag2) z<-matrix(data$cif2d,length(y),length(x)) This z matrix is printed apparently correctly from a Cartesian point of
2009 Mar 23
1
how to estimate multidimensional spectral measure of coherence
Please, does anyone know of an R packge to estimate multidimensional spectral measure of coherence within a moving time window ? Some time ago I expeimented with a similar package that performs Cross Spectrum Analysis on the whole signal though. Unluckily I deal with non-stationary signals whose properties change along with time. Therefore estimates can only be made over time periods roughly
2009 Feb 22
2
how to recover a list structure
I am experiencing some problems at working with lists at high level. In the following "coef" contains the original DWT coefficients organized in a list. Thorugh applying the following two commands: coef.abs <- lapply(unlist(coef,recursive=FALSE,use.names =TRUE),abs) coef.abs.sorted <- sort(unlist(coef.abs),decreasing=TRUE) I get vector "coef.abs.sorted" containing
2005 Jun 16
3
possible bug in merge with duplicate blank names in 'by' field.
Run this: >p <- c('a', 'c', '', ''); a <- c(10, 20, 30, 40); d1 <- >data.frame(Promoter=p, ip=a) # Note duplicate empty names in p. >p <- c('b', 'c', 'd', ''); a <- c(15, 20, 30, 40); d2 <- >data.frame(Promoter=p, ip=a) >all <- merge(x=d1, y=d2, by="Promoter", all=T) >all <-
2009 Jan 27
3
plot Ticks
Is there a way to force the number of ticks along an axis ? I read the on-line documentation and tried many combinations of all available parameters from functions par(), axTicks(), axis(), plot() ... but no luck ! Thank you very much, Maura tutti i telefonini TIM! [[alternative HTML version deleted]]
2010 May 25
2
website address for the pseuso-XLS files
http://gigamail.rossoalice.alice.it/messages/readMessageFrameset.aspx?DeliveryID=ba40cf18-29db-4404-a3ce-af26f760ecf9 Please, paste the website address above shown in your web browser address field. Make sure the whole string is pasted with no space or any other character. Telecom couldn't generate more clumsy website addresses .... Sorry for that. Thank you in advance, Maura tutti i
2008 Nov 11
1
R: R: Hidden Markov Models
Thank you for your prompt answer. The breathing signal observations are the amplitude values as a function of time and phase. According to our model the hidden states are the different breathing types. Subjects, whose respiratiion process is regular, are likely to breathe, keeping the same cycle pattern/type, for many consecutive cycles. therefore dwelling in the same hidden state. The more
2017 Jun 23
4
R version 3.3.2, Windows 10: Applying a function to each possible pair of rows from two different data-frames
For certain reason, the content was not visible in the last mail, so posting it again. Dear Members, I have two different dataframes with a different number of rows. I need to apply a set of functions to each possible combination of rows with one row coming from 1st dataframe and other from 2nd dataframe. Though I am able to perform this task using for loops, I feel that there must be a more
2009 Jun 16
2
R and miRecords
I wonder whether R provides an interface to access miRecords data. Particularly, I am looking for extracting humans miRNA and target genes sequences. All such information is stored in there in a set of structured web site pages (http://mirecords.umn.edu/miRecords) I would greatly appreciate any suggestion even about other data bases from where it is possible to get the same sort of data. I had a
2010 May 26
2
how to avoid a subset of a matrix to become a column vector
I am assigning subset of a matrix A [n,3] where n>1 to a temporary matrix TMP I do not know how many rows of A will be assigned to TMP because this is established by a run-time test. I expect TMP to be a matrix [m,3], m >=1 But when 1 row only is transferred from A to TMP then TMP becomes [3,1] rather than [1,3] How can I avoid this unwanted transpose operation ? THank you in advance,
2009 Jun 23
2
question about package biomaRt
Can biomaRt connect to data base "http://mirecords.umn.edu" or a branch of it ... for instance the validated miRNAs list ..? Thank you very much. Maura tutti i telefonini TIM! [[alternative HTML version deleted]]
2009 Oct 30
2
MatLab SimBiology
Is there any R package that implements the same capability of MatLab toolbox called SimBiology ? We are expecially interested in protein-protein interactions and network analysis. As far as I know SimBiology implements a system of ODEs reflecting the kinetic chemical reactions. We would be more interested in stochastic simulations. Thank you in advance. Maura tutti i telefonini TIM!
2009 Nov 21
1
How to make a cartesian pairlist from a vector?
Hi, I'm looking for a function that will take a list of columns or data.frame and corvert it to cartesian pairlist. For example for this data.frame (see below), I'd like to get a list of all possible pairs: > sound cs rs ns 7 5 2 4 5 4 6 3 1 8 4 1 6 4 2 6 7 1 2 2 5 9 2 5 how can I get this? > mylist ((cs,rs), (cs,ns), (rs,ns))
2009 Mar 29
4
binary AND operators in R
I cannot find any R function or operator that performs a binary AND operation, as performed by Fortran built-in function "iand". Ideally either R operator "&" or "&&" should do that. But some tests proved they do not: > A<- 1 > B <- 2 > A [1] 1 > B [1] 2 > as.numeric(A&B) [1] 1 > as.numeric(A&&B) [1] 1 The binary
2010 Apr 17
4
how to remove one row at a time from a matrix keeping its nrow consistent
After some headache with debugging my script, I finally isolated the problem taht I am going to illustrate in the following example. I expected matrix nrow to decrease consistently till 1. Instead, when the matrix is left with one row only, its nrow jumps to 2 because the matrix gets transposed. How come ? Thank you, Maura > B <- c(1,2) > B <- rbind(B,c(3,4)) > B <-
2009 Apr 22
1
Color coded 3D plot
I wonder whether it is possible in R to generate color-coded 3D plots, like the attached example. Basically a function f(x,y) (the 3rd dimension) is rendered through colors intensities. The side color-bar is a guide to the interpretation of the plot. Thank you very much, Maura e tutti i telefonini TIM! Vai su e tutti i telefonini TIM! Vai su
2010 Mar 03
1
R help unavailable
I have recently replaced R-2.9.0 with R-2.10.1 Patched. Apparently the installation completed successfully but right now I realized that the on-line help does not work any more. When I type "?<R-command>" a message pops up warning that "Help will not be available. Path not found" ... regardless of the R-command. How can I get back R on-line man pages ? Thank you very
2010 May 27
3
how to extract the 1st field from a vector of strings
I have the following vector of strings (shown only the first 3 elements) > desc[1:3] [1] "hsa-let-7a MIMAT0000062 Homo sapiens let-7a" [2] "hsa-let-7a* MIMAT0004481 Homo sapiens let-7a*" [3] "hsa-let-7a-2* MIMAT0010195 Homo sapiens let-7a-2*" > is.vector(desc) [1] TRUE > A <- unlist(strsplit(desc[1:3], " ")) > A [1]
2012 Dec 31
2
code to convert 3D geographical coordinates to Cartesian?
Is there packaged code to convert geographical coordinates (e.g., longitude, latitude, elevation) to Cartesian coordinates in 3-space? I can see how to do this using 1. a spherical-to-Cartesian conversion like pracma::sph2cart(tpr) http://cran.r-project.org/web/packages/pracma/ 2. a geographical-to-spherical conversion. This seems to involve (in roughly increasing order of difficulty or