search for: 5,5

Displaying 20 results from an estimated 266 matches for "5,5".

Did you mean: 1,5
2004 Feb 05
5
(Novice-) Problem with the plot-function
Hello, i have written this little function to draw different normal distributions: n.Plot <- function(x,my,sigma) { e <- exp(1) names(x) <- x f.x <- (1/(sigma*sqrt(2*pi)))*e^(-1*(((x-my)^2)/2*(sigma^2))) plot(f.x,type="l",xlim=c(-5,5)) return(f.x) } if i define x like this: x <- seq(-5,5,0.01) Now n.Plot(x,0,1) DOES draw the correct plot, but the x-axis is labeled from 0 - 1000. If i give the plot function the xlim=c(-5,5) option, the plot is only drawn for the first 5 values of x. How do i tell plot not to take the i...
2010 Jun 30
2
plain text in Chinese can not be set
...n the following code, the font to use for Latin text is correct. I also tested postscript(), and it did as what was expected. Any suggestions? Thanks in advance! Regards, Jinsong ### the code to reproduce my question ### pdf("test_0.pdf", fonts = c("GB1")) plot(1:10) text(5,4, "\u4F60\u597D", family="GB1", font = 0) ## bold text(5,5, "is 'hello' in Chinese", font = 0) ## normal dev.off() pdf("test_1.pdf", fonts = c("GB1")) plot(1:10) text(5,4, "\u4F60\u597D", family="GB1", font = 1) ## bold...
2011 Jan 18
3
disk quotas + centos 5,5 +xfs
Hi all, is any one aware quotas not working in 5,5? I'm using XFS as a file system. My fstab has the appropriate usrquota,grpquota but when I try to run; quotacheck -cug /foo I get; quotacheck: Can't find filesystem to check or filesystem not mounted with quota option. I already have a large amount of data in the mount. Do quotas...
2012 May 10
4
additional axis, different scale
Dear list, I am looking for a possibility to present results in a more graphical way by adding an axis. But I have trouble relating my data to the added axis. Imagine the following example: a <- c(10, 20, 30, 40) b <- c(50, 250, 500, 600) ba <- b/a par(las=1, mar=c(5,5,.5,5)) plot(a,b, type="b", pch=22, cex=2, col=4, lwd=2, ylim=c(0,650), xlim=c(0,45)) axis(4, at=c(seq(0,600,length=6)), lab=c(seq(0,25,length=6)), col.axis=2 ) lines(a,ba, type="b", pch=21, cex=2, col=2, lwd=2, lty=1)...
2012 Aug 12
2
"Masked by GlobalEnv"
...the followings. Like this >attach(machm) The following object(s) are masked _by_ '.GlobalEnv': coll, sp The following object(s) are masked from 'mach': angle, area, dis, plot, sp >xmach=dis*sin(angle/180*pi); ymach=dis*cos(angle/180*pi) >plot(xmach,ymach, xlim=c(-5,5),ylim=c(-5,5), pch=19, cex= machm$area*0.05,col=machm$coll) Graph did not take right R color code. How can i solve this problem?, As i am the newest user of R programme. with regards, ashok [[alternative HTML version deleted]]
2004 Apr 23
4
Tcl Tk table
...Rarray <- matrix(1:1000, ncol=20) for (i in (0:49)) for (j in (0:19)) .Tcl(paste("set tclArray(",i,",",j,") ",myRarray[i+1,j+1],sep="")) tt<-tktoplevel() table1 <- tkwidget(tt,"table",variable="tclArray", rows="50", cols="50") tkpack(table1) #Old version which worked in R 1.6 but it doesn't work with R 1.9 (and also not with 1.8), why?? tkcmd(.Tk.ID(table1),"tag","celltag","gruen",list(c("3,3", "4,4", "5,5", "6,6", &q...
2004 Jun 29
2
binding rows from different matrices
Hello list, I have 3 matrices with same dimension : > veca=matrix(1:25,5,5) > vecb=matrix(letters[1:25],5,5) > vecc=matrix(LETTERS[1:25],5,5) I would like to obtain a new matrix composed by alternating rows of these different matrices (row 1 of mat 1, row 1 of mat 2, row 1 of mat 3, row 2 of mat 1.....) I have found a solution to do it but it is not very p...
2004 Mar 26
1
Mahalanobis
Dear all Why isn'it possible to calculate Mahalanobis distances with R for a matrix with 1 row (observations) more than the number of columns (variables)? > mydata <- matrix(runif(12,-5,5), 4, 3) > mahalanobis(x=mydata, center=apply(mydata,2,mean), cov=var(mydata)) [1] 2.25 2.25 2.25 2.25 > mydata <- matrix(runif(420,-5,5), 21, 20) > mahalanobis(x=mydata, center=apply(mydata,2,mean), cov=var(mydata)) [1] 19.04762 19.04762 19.04762 19.04762 19.04762 19.04762 19.04762...
2000 Nov 08
1
Graphics?
Hi, Say I've setup a plot using layout which produce 2 rows x 1 column and I'm using the same x values for both subplots. Say for illustration that the top part is: plot(1:10, c(1,2,3,4,5,4,3,2,1,0), type="l") and for the bottom I have: plot(1:10, c(5,4,3,2,1,2,3,4,5,6), type="l") Now after the output of whatever function I use to draw this is done. What I'd like to know is, is it possible to draw a line from (5, 1) on the bottom part to (5,5) on the t...
2015 May 14
3
comportamiento de data.table al hacer calculos por grupos
.... Estoy haciendo calculos por grupos con data,table. Tengo un archivo (zp.res) con tres columnas que clasifican los datos (sol, con, dia) y una columna de datos numericos (media), de la siguiente forma: sol con dia media 1: con 0 1 -22.6 2: con 0 1 -36.6 3: con 0 1 -35.6 y quiero calcular el promedio de "media" (la col 4) agrupando con las variables sol,con,dia. Lo hago de la siguiente forma: med <- zp.res[, mean(media), by="sol,dia,con"] cuando reviso "med" esta todo bien, se han calculado las medias y el objeto tiene solo l...
2012 Nov 20
2
Ordering List Items Chronologically
...series of surveys in a list where the name of each list item is the date the survey was taken but the list items are out of order. Each data frame has a variable in it with the survey date as well, if that helps. Yours, Simon Kiss #Sample Data mylist<-list('1991-01-01'=data.frame(a=rep(5,5), survey.date=rep(as.Date('1991-01-01', format='%Y-%m-%d'))), '1979-01-01'=data.frame(aa=rep(5,5), survey.date=rep(as.Date('1979-01-01', format='%Y-%m-%d'), 5)), '2001-01-01'=data.frame(c=rep(6,5), survey.date=rep(as.Date('2001-01-01', forma...
2008 Jan 23
3
How do I get a character and a symbol in a legend
In the following snippet plot(1:10,1:10,type="n") points(1:5,1:5,pch="+") points(6:10,6:10,pch=20) legend(5,5, c("A","B"), pch=c("+",20)) I want to get a legend with a "+" and a solid circle (pch=20). However, what I get in the legend is "+" and "2". How can I get a "+" and a s...
2007 Aug 08
2
Relocating Axis Label/Title --2
Apologies for the previous mail (I sent it off too early by mistake). This is the correct example: rm(list=ls()) D_mean<-seq(-5,5,length=100) y<-exp(-D_mean^2/5) pdf("my.pdf") plot(D_mean,y,type="l",yaxt="n",lty=2,lwd=2,col="black", ylab = list(expression(paste(dN/dlogD[agg]," ["*cm^-3*"]"))), xlab = expression(paste(D[agg]," [nm]")), cex.lab=1.2 ) axi...
2013 Apr 03
3
arrayInd and which
...from which()? In addition take the following 20x10 matrix: td<-structure(c(1, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 6, 3, 6, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 6, 6, 6, 6, 6, 6, 6, 2, 6, 6, 1, 6, 6, 6, 6, 6, 6, 6, 6, 1, 6, 6, 5, 6, 6, 6, 6, 5, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6, 6, 2, 6, 6, 6, 6, 6, 6, 6, 2, 6, 6, 4, 6, 6, 6, 6, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 6, 6, 6, 6, 2, 6, 6, 6, 6, 6, 6, 6, 6,...
2007 Sep 07
1
contourplot lines, text, and mtext
...ave a contourplot (in the lattice package) and I want to add straight lines to it, how do I do this? I see that there are llines() and lsegement() functions for lattice plots, but they don't seem to do anything in this case: library(lattice) library(KernSmooth) x=rnorm(10000) y=x+rnorm(x,0,.5) a=bkde2D(cbind(x,y),.7) z=as.vector(a$fhat) grid=expand.grid(x=a$x1,y=a$x2) grid$z=z contourplot(z~x*y,data=grid,region=T,col.regions=gray(seq(1,0,len=255)),colorkey=T,cuts=50,contour=F) llines(x=c(-5,5),y=c(-5,5)) > NULL lsegments(x0=-5,y0=-5,x1=5,y1=5) I'm just trying to do the equivale...
2010 Dec 10
4
sudo doing DNS lookup
Hi, I have a confusing problem. I have two centos 5,5 boxes. Both have sudo.i386 1.7.2p1-9.el5_5 installed I am using the same sudoers file, but the one on box A keeps trying to do DNS lookups while the one on box B does not. How do I disable this DNS lookup? Thanks for any info. -- Stephen Clark *N...
2011 Dec 01
3
Assign name to object for each iteration in a loop.
...ant to extract the trend component of each decomposition ("x$time.series[,trend]), assign a name based on the factor "area". My input data look like this: Area is a factor, with three (but could be many more) levels. area 1 2 3 Ystart=2000 TS is a timeseries: X2000049 X2000065 X2000081 X2000097 X2000113 1 0.2080 0.2165 0.2149 0.2314 0.2028 2 0.1578 0.1671 0.1577 0.1593 0.1672 3 0.1897 0.1948 0.2290 0.2292 0.2067 Here's the function: STLpA<-function(TS, area, Ystart, period=23, nSG=&...
2005 Jan 27
5
Finding "runs" of TRUE in binary vector
I have a binary vector and I want to find all "regions" of that vector that are runs of TRUE (or FALSE). > a <- rnorm(10) > b <- a<0.5 > b [1] TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE TRUE TRUE My function would return something like a list: region[[1]] 1,3 region[[2]] 5,5 region[[3]] 7,10 Any ideas besides looping and setting start and ends directly? Thanks, Sean
2003 May 13
3
Sorting a matrix in an odd way
Hi, I have a matrix not unlike this: foo <- matrix(,5,5) foo[5,1] <- 1 foo[1:3,2] <- 1 foo[3:4,3] <- 1 foo[4:5,4] <- 1 foo[2:4,5] <- 1 foo [,1] [,2] [,3] [,4] [,5] [1,] NA 1 NA NA NA [2,] NA 1 NA NA 1 [3,] NA 1 1 NA 1 [4,] NA NA 1 1 1 [5,] 1 NA NA 1 NA I want to get a ve...
2006 Nov 07
1
gamm(): nested tensor product smooths
...b<-gam(y~s(x,bs="ps",m=c(3,2))+s(z,bs="ps",m=c(3,2))+te(x,z,bs=c("ps","ps"),m=c(3,1),mp=F)) ##works fine b <- gamm(y~s(x,bs="ps",m=c(3,2),k=10))+s(z,bs="ps",m=c(3,2),k=10)+te(x,z,bs=c("ps","ps"),m=c(3,1),k=c(5,5))) # : Singularity in backsolve at level 0, block 1 b <- gamm(y~te(x,z,bs=c("ps","ps"),m=c(3,0),k=c(5,5))) #works fine # Additionallly, i'd like to work with # just one smoothness parameter # for the interaction, but mp=F doesn't work either: b <- gamm(y~s(x,...