[R] changing the x axis labels in a time series plot

2012-07-14 Thread Jim Bouldin
OK, this has to be simple but I've searched through help files, mailing list archives and well, everything I could think of, and still no luck. I simply want to change the x axis labels in a time series graph, from its default numbering (which starts at 1 and increments by 1), to values I have in

[R] extract the p value

2011-10-24 Thread Jim Bouldin
summary output] F-statistic: 40.94 on 2 and 7 DF, p-value: 0.0001371 It does not seem to be obtainable from anova(lm(model)) either, only the p values for the individual predictors. Stumped. Jim Bouldin Research Ecologist [[alternative HTML version deleted

[R] converting object elements to variable names and making subsequent assignments thereto

2011-09-23 Thread Jim Bouldin
]) and lm(y~x[,2]), to the variables model1 and model2. There are of course, many more than 2 models involved, so brute force is the option of absolute last resort. Thanks for any help. -- Jim Bouldin, Research Ecologist [[alternative HTML version deleted

Re: [R] converting object elements to variable names and making subsequent assignments thereto

2011-09-23 Thread Jim Bouldin
in a list. Michael On Fri, Sep 23, 2011 at 1:03 PM, Jim Bouldin bouldi...@gmail.com wrote: This has got to be incredibly simple but I nevertheless can't figure it out as I am apparently brain dead. I just want to convert the elements of a character vector to variable names, so

Re: [R] converting object elements to variable names and making subsequent assignments thereto

2011-09-23 Thread Jim Bouldin
OK, I see. I thought R was just returning the character strings of the model names without doing any assigning, since that's what it displayed. I had it right all along. Thanks for your help. On Fri, Sep 23, 2011 at 1:45 PM, R. Michael Weylandt michael.weyla...@gmail.com wrote: What exactly

Re: [R] converting object elements to variable names and making subsequent assignments thereto

2011-09-23 Thread Jim Bouldin
. Michael On Fri, Sep 23, 2011 at 1:56 PM, Jim Bouldin bouldi...@gmail.com wrote: OK, I see. I thought R was just returning the character strings of the model names without doing any assigning, since that's what it displayed. I had it right all along. Thanks for your help. On Fri, Sep 23, 2011

[R] functions on rows or columns of two (or more) arrays

2011-08-04 Thread Jim Bouldin
for any help. -- Jim Bouldin, PhD Research Ecologist [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

[R] object names from character strings

2010-12-26 Thread Jim Bouldin
. Any help appreciated. Thanks. -- Jim Bouldin, PhD Research Ecologist __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented

[R] nls error regarding numerics vs logicals

2010-07-09 Thread Jim Bouldin
+ a.est * 2.7183^(b.est * ba.beg), start = list(constant = 4, : REAL() can only be applied to a 'numeric', not a 'logical' I can't see where there are any logicals in this equation to cause this problem. Any help appreciated. Thank you. Jim Bouldin

Re: [R] nls error regarding numerics vs logicals

2010-07-09 Thread Jim Bouldin
1. The expression you gave us is clearly not the one that produced the error: it involved ring.area and ba.beg. 2. You don't tell us what x and y are, so we can't reproduce anything. Sorry, I guess that was unclear. I changed the response and independent variable names to y and x

[R] quantiles on rows of a matrix

2010-07-07 Thread Jim Bouldin
: apply(matrix,1,mean,na.rm=T,trim=.05)) and the trim argument was simply ignored Stumped. Any help appreciated. Thanks. Jim Bouldin, PhD Research Ecologist Department of Plant Sciences, UC Davis Davis CA, 95616 530-554-1740 __ R-help@r-project.org mailing

[R] removing duplicate rows

2010-05-11 Thread Jim Bouldin
the arguments were altered: all records were returned instead of the uniques. Completely stumped--any help appreciated. Thanks. Jim Bouldin, PhD Research Ecologist Department of Plant Sciences, UC Davis Davis CA, 95616 530-554-1740 __ R-help@r-project.org

[R] splitting character strings and converting to numeric vectors

2010-05-06 Thread Jim Bouldin
.. -448301 854833 c...448060854818.. -448060 854818 c...446828854736.. -446828 854736 So far so good, but columns 1:2 will not coerce to either numeric or integer, for unknown reasons. Thanks for any help (and/or suggestions on a better way to code this). Jim Bouldin, PhD Research Ecologist

[R] NAs and row/column calculations

2010-03-11 Thread Jim Bouldin
to calculating summary values from rows or columns containing NAs? Drives me nuts. More nuts that is. Thanks. Jim Bouldin, PhD Research Ecologist Department of Plant Sciences, UC Davis Davis CA, 95616 530-554-1740 __ R-help@r-project.org mailing list https

Re: [R] NAs and row/column calculations

2010-03-11 Thread Jim Bouldin
On 12/03/2010, at 11:25 AM, Jim Bouldin wrote: I continue to have great frustrations with NA values--in particular making summary calculations on rows or cols of a matrix containing them. For example, why does: a = matrix(1:30,nrow=5) is.na(a[c(1:2),c(3:4)]);a [,1

[R] assigning a file name, or part of, to an object

2010-01-22 Thread Jim Bouldin
in advance for any help. Jim Bouldin Research Ecologist Department of Plant Sciences, UC Davis Davis CA, 95616 530-554-1740 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] calculations on columns with partially matching names

2010-01-03 Thread Jim Bouldin
characters; their mean would be taken whereas any columns beginning with other than mpw06 would be excluded. I need to compare every pair of columns in the frame, and in some cases, possibly three at a time. Thanks in advance for any ideas. Jim Bouldin Research Ecologist Department of Plant

[R] nls error message

2009-12-28 Thread Jim Bouldin
', not a 'logical' I've got no clue as to the REAL() to which this is referring. Any help appreciated. Thanks in advance. Jim Bouldin Research Ecologist Department of Plant Sciences, UC Davis Davis CA, 95616 530-554-1740 __ R-help@r-project.org mailing list https

[R] no html help upon upgrading to 2.10

2009-12-04 Thread Jim Bouldin
. For a complete list of functions, use ‘library(help=base)’. and not the html help screen with full package or function description like I used to. Exceedingly problematic, and I can find nothing either in the FAQs or the R search sites on what to do. Solutions much appreciated, thanks. Jim

[R] linear regression on groups of consecutive rows of a matrix

2009-11-24 Thread Jim Bouldin
1.36 1.84 1.06 0.56 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA etc IF I solve these problems, will I in fact be able to perform individual linear regressions on the (numerous) collections of 5 to 10 rows? Thanks as always for any insight. Jim Bouldin Research

Re: [R] linear regression on groups of consecutive rows of a matrix

2009-11-24 Thread Jim Bouldin
+ observations per year (row), so for 5 rows I have n = 100+. For my purposes (removing the effect of tree size on ring width for small groups of years) that is more than good enough. Now to try out your suggestion... Jim -- David On Nov 24, 2009, at 3:25 PM, Jim Bouldin wrote: I want

Re: [R] consecutive numbering of elements in a matrix

2009-11-22 Thread Jim Bouldin
Many thanks to Dimitris, William and David for very helpful answers which solved my problem. Being a relatve newb, I am confused by something in the solutions by Dimitris and David. #Create a matrix A as follows: A - matrix(sample(50, 21), 7, 3) A[sample(21, 5)] - NA;A [,1] [,2] [,3]

Re: [R] consecutive numbering of elements in a matrix

2009-11-22 Thread Jim Bouldin
, 4,5)) matrix(B[order(col(B), B)], nrow(B), ncol(B)) I hope it helps. Best, Dimitris Jim Bouldin, PhD Research Ecologist Department of Plant Sciences, UC Davis Davis CA, 95616 530-554-1740 __ R-help@r-project.org mailing list https

[R] consecutive numbering of elements in a matrix

2009-11-21 Thread Jim Bouldin
columns, the non-NA values within each column (i.e. A[1,1] A[3,2] and A[3,3] would all be set to one, and subsequent values in those columns would increase by one, until the last non-NA value is reached, if any). Any ideas? Thanks Jim Bouldin, PhD Research Ecologist Department of Plant Sciences, UC

Re: [R] consecutive numbering of elements in a matrix

2009-11-21 Thread Jim Bouldin
Spotfire, TIBCO Software wdunlap tibco.com Any ideas? Thanks Jim Bouldin, PhD Research Ecologist Department of Plant Sciences, UC Davis Davis CA, 95616 530-554-1740 __ R-help@r-project.org mailing list https

[R] subsetting from a vector or matrix

2009-09-24 Thread Jim Bouldin
. Thanks for any help. Jim Bouldin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible

Re: [R] problem selecting rows meeting a criterion

2009-08-11 Thread Jim Bouldin
Thoughts much appreciated. Thanks. Jim Bouldin Clearly I was more tired than I realised last night. :( My appologies. In any case with the data.frame name changed to xx this seems to give you what you want subset(xx, xx[,1] xx[,2]) or using the data name subset(data, data[,1] data

Re: [R] problem selecting rows meeting a criterion

2009-08-11 Thread Jim Bouldin
, will the command I originally used work. However, I see that it is much easier to just use the subset function or perhaps the with function. Seems that R has many painful lessons to teach. Thanks again. Jim Bouldin This won't work in general, and is probably only working in this particular case because you

[R] problem selecting rows meeting a criterion

2009-08-10 Thread Jim Bouldin
10 5 2 5.656854 11 1 3 2.236068 12 2 3 9.486833 17 2 4 2.236068 18 3 4 8.062258 24 4 5 5.385165 Clearly, this is not what I intend but I cannot figure out what I've done wrong. Any help appreciated. Thanks. Jim Bouldin __ R-help@r-project.org mailing

Re: [R] problem selecting rows meeting a criterion

2009-08-10 Thread Jim Bouldin
1 3 2.236068 12 2 3 9.486833 17 2 4 2.236068 18 3 4 8.062258 24 4 5 5.385165 --- On Mon, 8/10/09, Jim Bouldin jrboul...@ucdavis.edu wrote: From: Jim Bouldin jrboul...@ucdavis.edu Subject: [R] problem selecting rows meeting a criterion To: r-help@r-project.org Received: Monday

[R] R's database capabilities

2009-08-04 Thread Jim Bouldin
started? Thanks! Jim Bouldin, PhD Research Ecologist Department of Plant Sciences, UC Davis Davis CA, 95616 530-554-1740 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] error message: .Random.seed is not an integer vector but of type 'list'

2009-07-23 Thread Jim Bouldin
) Error in sample(x, 3) : .Random.seed is not an integer vector but of type 'list' Jim Bouldin, PhD Research Ecologist Department of Plant Sciences, UC Davis Davis CA, 95616 530-554-1740 __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] error message: .Random.seed is not an integer vector but of type 'list'

2009-07-23 Thread Jim Bouldin
Thank you. However, when I tried that, I got this message: Warning message: In rm(.Random.seed) : variable .Random.seed was not found Jim Bouldin wrote: I'm trying to run this simple random sample procedure and keep getting the error message shown. I don't understand this; I've

Re: [R] error message: .Random.seed is not an integer vector but of type 'list'

2009-07-23 Thread Jim Bouldin
Jim Bouldin wrote: Thank you. However, when I tried that, I got this message: Warning message: In rm(.Random.seed) : variable .Random.seed was not found In that case, have you attached some package that has its own .Random.seed? Try to find where the current .random.seed

Re: [R] error message: .Random.seed is not an integer vector but

2009-07-23 Thread Jim Bouldin
...@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 23-Jul-09 Time: 17:23:09 -- XFMail -- Jim Bouldin, PhD Research Ecologist Department of Plant Sciences, UC Davis Davis CA, 95616 530-554-1740

[R] Random # generator accuracy

2009-07-23 Thread Jim Bouldin
, of size 3, weighted by weights; the mean should be 7.50) [1] 7.406977 7.406977/7.5 [1] 0.987597 b = mean(replicate(100,(sample(x, 3;b # (1 million samples from x, of size 3, not weighted this time; the mean should be 6.50) [1] 6.501477 6.501477/6.5 [1] 1.000227 Jim Bouldin, PhD Research

Re: [R] Random # generator accuracy

2009-07-23 Thread Jim Bouldin
- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Jim Bouldin Sent: Thursday, July 23, 2009 12:00 PM To: r-help@r-project.org Subject: [R] Random # generator accuracy Dan Nordlund wrote: It would be necessary to see the code for your

Re: [R] Random # generator accuracy

2009-07-23 Thread Jim Bouldin
. E-Mail: (Ted Harding) ted.hard...@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 23-Jul-09 Time: 21:05:07 -- XFMail -- Jim Bouldin, PhD Research Ecologist

Re: [R] Random # generator accuracy

2009-07-23 Thread Jim Bouldin
Ted. On 23-Jul-09 20:56:43, Jim Bouldin wrote: You are absolutely correct Ted. When no weights are applied it doesn't matter if you sample with or without replacement, because the probability of choosing any particular value is equally distributed among all such. But when they're

[R] unloading loaded packages

2009-04-30 Thread Jim Bouldin
I can't seem to find info on how to unload packages that have been loaded. My goal in doing so is to gain access to functions that have been masked out by those packages. Or is there another way to do so? Thanks in advance. Jim Bouldin, PhD Research Ecologist Department of Plant Sciences