search for: nbcol

Displaying 11 results from an estimated 11 matches for "nbcol".

Did you mean: n_col
2006 May 17
0
script S-plus -> R
Dear List, I'm trying to transfer a script that uses S-plus functions for the kernel and integration calculations to R. This it what it looks like in S-plus: qrm(cpt,don,ect,h,intctk,nbcol,nbl1,nbl2,nbl3,nlc,nlgn,overlap,Results,tdon,tdon1,tdon11,tdon2,tdon21) don<-guiDisplayFileDialog() import.data (DataFrame="tdon",FileName=don,FileType="EXCEL") nbcol<-length(tdon[1,]) nlc<-matrix(0,1,nbcol) for (i in 1:nbcol) {nbl1<-tdon[,i] nbl2<-nbl1[nbl1!=&qu...
2010 Jan 23
1
matrix to a C function
Hi the list, Is there a way to give a matrix to a C function, and then to use it as a matrix ? I write a function to print a matrix, but I use it as a vector : 1. void printMatrix(double *mTraj,int *nbCol, int *nbLigne){ 2. int i=0,j=0; 3. for(i=0 ; i < *nbLigne ; i++){ 4. for(j=0 ; j < *nbCol ; j++){ 5. Rprintf(" %f",mTraj[i * *nbCol + j]); 6. } 7. Rprintf("\n"); 8. } 9. } I would like to use it as a matrix (line 5 changes) : 1. void print...
2011 Mar 18
0
keep color range constant across three persp() graphs
...to keeping the colors consistent with z-values, rather than number of facets. x <- 1:10 y <- 1:10 z1 <- matrix(1:100,10,10) z2 <- matrix(seq(0.5,50,by=.5),10,10) z <- z1 nrz <- nrow(z) ncz <- ncol(z) jet.colors <- colorRampPalette( c("yellow", "red") ) nbcol <- 100 color <- jet.colors(nbcol) zfacet <- z[-1, -1] + z[-1, -ncz] + z[-nrz, -1] + z[-nrz, -ncz] facetcol <- cut(zfacet, nbcol) persp(x,y,z,col=color[facetcol], ticktype = "detailed", phi=30,theta=30) ##### Second Graph ### z <- z2 nrz <- nrow(z) ncz <- ncol(z) j...
2009 Aug 30
3
Computer Modern Fonts in R graphic
...ngth=100) > sm <- seq(0,4,length=100) > f <- function(x,y) {5.64080973 + 0.12271038*x - 0.27725481 * y + 0.29281216*x*y} > z <- outer(sn,sm,f) > > nrz <- nrow(z) > ncz <- ncol(z) > jet.colors <- colorRampPalette( c("yellow", "red") ) > nbcol <- 100 > color <- jet.colors(nbcol) > zfacet <- z[-1, -1] + z[-1, -ncz] + z[-nrz, -1] + z[-nrz, -ncz] > facetcol <- cut(zfacet, nbcol) > > CM <- Type1Font("CM", > c("cm-lgc/fonts/afm/public/cm-lgc/fcmr8a.afm", >...
2013 Jun 25
1
Correct scaling of axis in persp3d plot
...iddle in yellow. So the coloring should depend on the z values. I tried the following, but it does not give nice results: nrz <- nrow(z) ncz <- ncol(z) jet.colors <- colorRampPalette( c("#ffcccc", "#cc0000") ) # Generate the desired number of colors from this palette nbcol <- 100 color <- jet.colors(nbcol) # Compute the z-value at the facet centres zfacet <- z[-1, -1] + z[-1, -ncz] + z[-nrz, -1] + z[-nrz, -ncz] # Recode facet z-values into color indices facetcol <- cut(zfacet, nbcol) persp3d(x, y, z, theta=50, phi=25, expand=0.75, col=color[facetcol], t...
2006 Jun 02
1
doubt with integrate ()
...an error with the "integrate" function. Searching in the r-help archives, I think this may have something to do with the function (it is not returning a vector but a number), but I don't see exactly what. The function to integrate was defined with a for loop first: for (i in 1:(nbcol-1)) {tdon1<-tdon[,i] tdon11<-subset(tdon1,tdon1!="NA") fctk1<-function(x) {density(tdon11, bandwidth=h[i], kernel="gaussian")$y} for (j in (i+1):nbcol) {tdon2<-tdon[,j] tdon21<-subset(tdon2,tdon2!="NA") fctk2<-function...
2006 Jul 11
0
script problem to obtain pairs of overlap values
...bandwidth "h", which was estimated in other part of script. tdon <- data.frame (sp.1=c (5 ,9 ,NA ,5, 11) , sp.2=c (4, 2, 4, NA, 11, ),sp.3=c(5, 4, 2, 6, 13), sp.4=c(3 , 11, NA, 5, 3), sp.5=c(2 ,5 ,2, 9, 9)) > h [1] 1.047 2.973 0.887 1.520 2.955 Here is the code: for (i in 1:(nbcol-1)) # nbcol<-ncol(tdon) {tdon1<-tdon[,i] tdon11<- subset(tdon1,tdon1!="NA") fctk1<-function(x) {density (tdon11, bw=h[i], kernel="gaussian")$y} for (j in (i+1):nbcol) {tdon2<-tdon[,j] tdon21<- subset(tdon2,tdon2!="NA") fct...
2017 Jun 17
3
write.dna command
...file. DNAid <- "JF806202" # Store the sequence in lst (a list) lst <- read.GenBank(DNAid, as.character = T) # convert the sequence to fasta format write.dna (lst, file = "DNAseq.fasta", format = "fasta", append = FALSE, nbcol= 6, colsep= " ", colw= 10) Any help will be appreciated. Thank you. Kelas [[alternative HTML version deleted]]
2017 Jun 17
0
write.dna command
...;JF806202" > > # Store the sequence in lst (a list) > lst <- read.GenBank(DNAid, as.character = T) > > # convert the sequence to fasta format > write.dna (lst, file = "DNAseq.fasta", format = "fasta", append = >FALSE, > nbcol= 6, colsep= " ", colw= 10) > > >Any help will be appreciated. >Thank you. > >Kelas > > [[alternative HTML version deleted]] > >______________________________________________ >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >https://...
2008 Sep 05
3
how to draw the legend about color from 3d picture
I have drawed a picture with persp, it's 3d map with different color, indicate different altitude. In gnuplot, the corresponding command 'splot' will generate a picture beside to indicate the relationship between color and altitude. But in R, how to draw it? I have read the manual of legend, but they are all about how to draw a legend with colored text, not a continuous varing color
2009 Sep 01
1
Logistic Politomic Regression in R
...ngth=100) > sm <- seq(0,4,length=100) > f <- function(x,y) {5.64080973 + 0.12271038*x - 0.27725481 * y + 0.29281216*x*y} > z <- outer(sn,sm,f) > > nrz <- nrow(z) > ncz <- ncol(z) > jet.colors <- colorRampPalette( c("yellow", "red") ) > nbcol <- 100 > color <- jet.colors(nbcol) > zfacet <- z[-1, -1] + z[-1, -ncz] + z[-nrz, -1] + z[-nrz, -ncz] > facetcol <- cut(zfacet, nbcol) > > CM <- Type1Font("CM", >                      c("cm-lgc/fonts/afm/public/cm-lgc/fcmr8a.afm", >         ...