[R] DNA dotmatrix window argument

2006-11-26 Thread Jeffrey Robert Spies
Hi all, I just compiled package dna v. 0.2 from source and am having some difficulty with the window argument of the dotmatrix function. Some test code; say I'm simulating some nucleotide sequences: sequence1-trunc(runif(200,0,4)) sequence2-trunc(runif(200,0,4)) I embed a nice 100

Re: [R] Newbie: how to get unique x unique x aggregate chart?

2006-11-15 Thread Jeffrey Robert Spies
I'm not sure I understand the question, but you might look into the following functions: unique heatmap image Again, if I understand the question, you would create a length(unique (x)) by length(unique(y)) sized matrix, and fill it with appropriate values of z. Then pass that to heatmap or

[R] Dotmatrix Plots

2006-11-15 Thread Jeffrey Robert Spies
Hi all, Does anyone know what happened to the dna library or the dotmatrix function? For the life of me, I can't find it anywhere with the exception of this reference: http://rss.acs.unt.edu/Rdoc/library/dna/html/dotmatrix.html Thanks! Jeff. http://www.nd.edu/~jspies/

Re: [R] Plot title with numeric variables

2006-11-14 Thread Jeffrey Robert Spies
How about using the cat function to concatenate the constant string with the dynamic string and then bold the result of that? -- Jeff Spies http://www.nd.edu/~jspies/ On Nov 14, 2006, at 4:39 PM, Rene Braeckman wrote: Thanks for your quick response. This works but the problem is that I

[R] the secret (?) language of lists

2006-11-14 Thread Jeffrey Robert Spies
A couple days ago, Mark Leeds asked about a solution that would basically stagger two lists, a and b, to return a list in the form of a[1], b[1], a[2], b[2], a[3] In particular, the summary of his question was in reference to lists defined by x - 5 tempin - seq(1,1411, by=30) a -

Re: [R] the secret (?) language of lists

2006-11-14 Thread Jeffrey Robert Spies
Thanks for the responses; and Gunter, I apologize if you feel you WTFM again in responding. The two issues that I originally had in understanding why the operations behaved as they did were in (1) c() reducing an rbind the way it did, and (2) vector recycling, as Peter mentioned. Issue (1)

Re: [R] Forcing the intercept

2006-11-13 Thread Jeffrey Robert Spies
Second part: you want to look at the residuals after specifying a model? Just use the dependent variables in your subsample as the dependent variables in your regression equation and subtract that from your outcome variable in your subsample. Might not be the answer to the question

Re: [R] Embedded carriage returns in text document

2006-11-13 Thread Jeffrey Robert Spies
For OS X, http://dos2unix.darwinports.com/ -- Jeffrey R. Spies http://www.nd.edu/~jspies/ On Nov 13, 2006, at 11:06 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Dennis, You can get rid of the '^M' by reformating the file from DOS to UNIX. Withing a UNIX system send the command

Re: [R] segfault 'memory not mapped', dual core problem?

2006-11-12 Thread Jeffrey Robert Spies
What failed for you did not fail for me. version _ platform powerpc-apple-darwin7.9.0 arch powerpc os darwin7.9.0 system powerpc, darwin7.9.0 status major2 minor2.1 year 2005 month12 day 20 svn rev 36812 language R Just to help bound the problem,

Re: [R] I think a simple question

2006-11-12 Thread Jeffrey Robert Spies
tempin - seq(1, 1411, by=30) tempout - array(data=NA, dim=length(tempin)*2) tempout[seq(1,length(tempin)*2, by=2)]-tempin tempout[seq(2,length(tempin)*2, by=2)]-tempin+5 Is this what you're looking for? Jeff. On Nov 12, 2006, at 5:20 PM, Leeds, Mark (IED) wrote: I have index ( of a vector )

Re: [R] I think a simple question

2006-11-12 Thread Jeffrey Robert Spies
Funciton form: everyOther - function(tempin, x){ tempout[seq(1,length(tempin)*2, by=2)]-tempin tempout[seq(2,length(tempin)*2, by=2)]-tempin+x tempout } Jeff. On Nov 12, 2006, at 5:31 PM, Jeffrey Robert Spies wrote: tempin - seq(1, 1411, by=30) tempout - array(data=NA

Re: [R] I think a simple question

2006-11-12 Thread Jeffrey Robert Spies
[seq(2,length(tempin)*2, by=2)]-tempin+x tempout } Usage: everyOther(seq(1,1411, by=30), 5) Sorry, Jeff. On Nov 12, 2006, at 5:35 PM, Jeffrey Robert Spies wrote: Funciton form: everyOther - function(tempin, x){ tempout[seq(1,length(tempin)*2, by=2)]-tempin tempout[seq(2

Re: [R] I think a simple question

2006-11-12 Thread Jeffrey Robert Spies
Note, the wrapped sort is a really tight solution but won't necessarily always give you an intertwined array. For example, if x=31 (or basically, tempin[2] or greater), then you would get 1, 31, 32, etc. instead of 1, 32, 31 Depends on what you were looking for. Jeff. On Nov 12,

Re: [R] I think a simple question

2006-11-12 Thread Jeffrey Robert Spies
Much more elegant! Is there a way, from the documentation, we would know that c() and lists in general behave as they do in these two lines? Jeff. On Nov 12, 2006, at 6:32 PM, Peter Dalgaard wrote: One way is c(rbind(tempin,tempin+5)) another is rep(tempin, each=2) + c(0,5)

Re: [R] R Help

2006-11-11 Thread Jeffrey Robert Spies
If you were trying to use the sep=\t argument, you might have encountered an error, as there are three tabs one of the two blank lines at the end of your data file. The default for read.table and read.delim (as has been suggested by David and Benilton) is whitespace, which consumes the

Re: [R] Making a case for using R in Academia

2006-11-10 Thread Jeffrey Robert Spies
As a student, I'll throw my two cents into this discussion. To preface my opinion, I am in a Joint Ph.D. program in Quantitative Psychology and Computer Science; I have a significant programming background and use R (or custom-built software that relies on R in some way) for the majority

Re: [R] how to plot a data.frame?

2006-10-30 Thread Jeffrey Robert Spies
Yep: ?image Creates a grid of colored or gray-scale rectangles with colors corresponding to the values in z. This can be used to display three- dimensional or spatial data aka “images”. This is a generic function. Hope that helps, Jeff. On Oct 30, 2006, at 7:01 PM, Weiwei Shi wrote: hi,

Re: [R] Newbie: Better way to do compound conditionals in subset?

2006-10-26 Thread Jeffrey Robert Spies
I would personally use the following method (example using the iris data included with R): data(iris) tSelect - (iris$Sepal.Length 6.0 iris$Sepal.Length 6.2 iris $Sepal.Width == 3.0) tSelectedData - iris[tSelect,] Then you can simply work with tSelectedData for whatever equation you

Re: [R] The Censummary Function...

2006-10-23 Thread Jeffrey Robert Spies
Try: censummary(AsExample$AsLow, AsExample$AsHigh, AsExample$AsCen) From the Introduction to R (http://cran.r-project.org/doc/manuals/R- intro.html#Lists-and-data-frames): Components of lists may also be named, and in this case the component may be referred to either by giving the component