Hello R-Helpers, plot(x, y, type="b", pch="1") plots x vs. y with both a line and the symbol "1" but how do I change the "spacing" of the symbol being plotted. In other words, I don't want to plot the "1" at every data point, but only at every kth point (things get too cluttered when there are many data points). Thanks in advance! -- Wolfgang Viechtbauer -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Brett Magill
2002-Oct-31 03:57 UTC
[R] My Functions on the Web (Including Factor Anlysis by Principal Components)
I have made some functions that I wrote available on the web. Not a package, but I know some people have found them useful. The url is: http://home.earthlink.net/~bmagill/MyMisc.html Included, and of special interest to some is prinfact, my function for principal components factor analysis--updated and now including print and plot methods. Also included: Reliability estimates (alpha) and item total correlations for scale/test development. Frequency tables and descriptive statistics A function to convert covariance matrix to correlation matrix Several others Comments and suggestions are appreciated. Brett. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Argument 'pch' can also be a vector, e.g. x <- rnorm(1000) y <- rnorm(1000) # pch=".", but every k:th is a "1". k <- 5 pch <- rep(".", length(x)) pch[seq(1,length(x),by=k)] <- "1" plot(x,y, type="b", pch=pch)> -----Original Message----- > From: owner-r-help at stat.math.ethz.ch > [mailto:owner-r-help at stat.math.ethz.ch] On Behalf Of Wolfgang > Viechtbauer > Sent: den 31 oktober 2002 13:42 > To: r-help at stat.math.ethz.ch > Subject: [R] Changing pch spacing > > > Hello R-Helpers, > > plot(x, y, type="b", pch="1") > > plots x vs. y with both a line and the symbol "1" but how do > I change the "spacing" of the symbol being plotted. In other > words, I don't want to plot the "1" at every data point, but > only at every kth point (things get too cluttered when there > are many data points). Thanks in advance! > > -- > Wolfgang Viechtbauer > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. > -.-.-.-.-.-.-.-.- > r-help mailing list -- Read > http://www.ci.tuwien.ac.at/~hornik/R/R-> FAQ.html > Send "info", > "help", or "[un]subscribe" > (in the > "body", not the subject !) To: > r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. > _._._._._._._._._ > >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
You could try plot(x, type="o", pch=c(rep(" ", k-1), "1")) or plot(x, type="b", pch=c(rep(" ", k-1), "1")) though neither are probably exactly what you want. On Wednesday 30 October 2002 08:41 pm, Wolfgang Viechtbauer wrote:> Hello R-Helpers, > > plot(x, y, type="b", pch="1") > > plots x vs. y with both a line and the symbol "1" but how do I change > the "spacing" of the symbol being plotted. In other words, I don't want > to plot the "1" at every data point, but only at every kth point (things > get too cluttered when there are many data points). Thanks in advance! > > -- > Wolfgang Viechtbauer > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- >.-.- r-help mailing list -- Read > http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or > "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >._._-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._