Re: [R] seeking advice about rounding error and %%

2011-08-14 Thread Uwe Ligges
Actually sapply(x %% 1, function(x) isTRUE(all.equal(x, 0))) seems to be the way to go. Uwe Ligges On 14.08.2011 07:17, Ken wrote: How about something like: If(round(x)!=x){zap} not exactly working code but might help Ken On Aug 13, 2554 BE, at 3:42 PM, Paul Johnson wrote: A client

Re: [R] seeking advice about rounding error and %%

2011-08-13 Thread Ken
How about something like: If(round(x)!=x){zap} not exactly working code but might help Ken On Aug 13, 2554 BE, at 3:42 PM, Paul Johnson wrote: > A client came into our consulting center with some data that had been > damaged by somebody who opened it in MS Excel. The columns were > supposed

Re: [R] seeking advice about rounding error and %%

2011-08-13 Thread Joshua Wiley
Hi Paul, What about using: x[x != as.integer(x)] <- NA I cannot think of a situation off hand where this would fail to turn every non integer to missing. I wonder if there is really a point to this? Can the client proceed with data analysis with any degree of confidence when an unknown mechani

[R] seeking advice about rounding error and %%

2011-08-13 Thread Paul Johnson
A client came into our consulting center with some data that had been damaged by somebody who opened it in MS Excel. The columns were supposed to be integer valued, 0 through 5, but some of the values were mysteriously damaged. There were scores like 1.18329322 and such in there. Until he tracks

[R] Seeking advice on dynamic linear models with matrix state variable.

2010-11-24 Thread Taste of R
  Hello, fellow R users,   I recently need to estimate a dynamic linear model in the following form:   For the measurement equation:   Y_t = F_t * a_t + v_t   where Y_t is the observation. It is a 1 by q row vector for each t. F_t is my forecasting variable. It is a 1 by p row vector. a_t is my st

[R] Seeking advice

2010-08-20 Thread Stephen Liu
Hi folks, Has any folks read before; Basic Statistics Rand R.Wilcox http://www.ebooksx.com/Basic-Statistics-Understanding-Conventional-Methods-and-Modern-Insights_303718.html It is good for a layman in statistics? TIA B.R. Stephen L __ R-help@r-