Displaying 20 results from an estimated 90 matches similar to: "predict/residual"
2009 Sep 25
1
if else and loop for code in R
I am using if else and loop to sortout the data set that is the values
less than o or more than 100 will be chosen.I could not get outTable
with loop.
Please help me to correct the code:
I USED:
# Read
a_data <- read.table("D:/SNP/copy.sas", header=T, sep="\t")
tr <- a_data$truck
ca <- a_data$cars
length <- nrow(a_data)
outTable <- matrix(nrow=length,ncol=3)
2012 Jun 01
1
How to make a transaction class data?
Hi,
I have encounter a problem that my data a_data.frame is of data.frame class
with columns: sequenceID, eventID, items.
when I convert it to transaction class:
as(a_data.frame, "transactions")
All columns are grouped together under items, which is like this:
{sequenceID, eventID, items}
instead of the right form: sequenceID, eventID, {items}
Also when i read_baskets, there is
2001 Oct 22
1
No subject
Dear all,
I may have overlooked something but the following piece of code causes me
trouble:
> a_data.frame(1:4)
> a
X1.4
1 1
2 2
3 3
4 4
> apply(a,2,cat)
1 2 3 4Error in ans[[1]] : subscript out of bounds
> apply(a,1,cat)
1234NULL
Is this the fact my data.frame has only one dimension ?
(and do I forget somewhere (but where ?) to specify not to 'drop'
2002 May 01
1
compiling R-1.5.0, package methods, on Solaris 5.7
Compiling package methods, R-1.5.0, on Solaris 5.7 failed (output below)
for me with
- gcc-2.95.3, perl-5.005_03
and also
- gcc-3.0.4, perl-5.6.1
Any ideas a) what the problem is or even better b) how to solve it?
Uwe Ligges
===================================
[...]
building package 'methods'
../../../library/methods/man/methods.Rd is unchanged
making do_substitute_direct.d from
2014 Dec 10
2
[LLVMdev] NEON intrinsics preventing redundant load optimization?
On 9 Dec 2014, at 02:20, Jim Grosbach <grosbach at apple.com> wrote:
>> On Dec 8, 2014, at 1:05 AM, Simon Taylor <simontaylor1 at ntlworld.com> wrote:
>>
>> On 8 Dec 2014, at 00:13, Renato Golin <renato.golin at linaro.org> wrote:
>>
>>> On 7 December 2014 at 19:15, Simon Taylor <simontaylor1 at ntlworld.com> wrote:
>>>> Is
2006 May 18
5
Overriding default DELETE behavior with logical deletes
Hello!
I am trying to figure out how to implement *logical deletes* instead of
physical deletes using ActiveRecord. Basically, in many applications
that deal with E-Commerce, you really can''t physically delete almost
anything, because records must be kept for auditing and customer service
tracking purposes.
In the past, I''ve implemented logical deletes as follows:
1.
2002 May 20
1
suggestion for example for base:naresid
Dear list:
since it took me a little while to figure out how to make use of naresid, I thought that
the below R code might be useful as an example on the help page.
Regards,
Markus
# generate some data
x1 <- runif(20)
y <- 10 + 5*x1 + rnorm(20)
summary(lm.0 <- lm(y ~ x1))
# append some NA's to y
y <- c(y, rep(NA, 5))
# generate some further x1s
x1 <- c(x1, runif(5))
#
2001 Aug 29
1
suggestion for example for base:naresid
Dear list:
since it took me a little while to figure out how to make use of naresid, I thought that
the below R code might be useful as an example on the help page.
Regards,
Markus
# generate some data
x1 <- runif(20)
y <- 10 + 5*x1 + rnorm(20)
summary(lm.0 <- lm(y ~ x1))
# append some NA's to y
y <- c(y, rep(NA, 5))
# generate some further x1s
x1 <- c(x1, runif(5))
#
2011 Jan 14
1
naresid.exclude query
x <- NA
na.act <- na.action(na.exclude(x))
y <- rep(0,0)
naresid(na.act,y)
... currently produces the result...
numeric(0)
... whereas the documentation might lead you to expect
NA
The behaviour is caused by the line
if (length(x) == 0L) return(x)
in `stats:::naresid.exclude'. Removing this line results in the behaviour I'd
expected in the above example (and in a
2014 Mar 06
1
makepredictcall
An issue came up with the rms package today that makepredictcall would solve, and I was
going to suggest it to the author. But looking in the help documents I couldn't find any
reference to it. There is a manual page, but it does not give much aid in creating code
for a new transformation function. Did I miss something?
If not, I'd be willing to draft a paragraph about that which
2004 Mar 28
2
residuals with missing values
hi: sorry to bother you all again. I am running a simple lm(y~x+z)
regression, in which some of the observations are missing.
Unfortunately, the residuals vector from the lm object omits all the
missing values, which means that I cannot simply do residual diagnostics
(e.g., plot(y,x)). Would it not make more sense to have the residuals
propagate the missing values, so that the residuals
2011 Mar 10
1
Problem with defining new method for residuals()
Dear all,
I'm writing a package and I would like to reuse the residuals() function. When I use a function which calls the redefined residuals (for my custom class) I get an error (see below). It looks like the wrong method is used. The strange this is, that when it execute the code manually it get no error.
Any suggestions?
Best regards,
Thierry
The entire source code is at
2008 Dec 28
1
model.matrix and missing values
Hi,
Does anyone know an easy way of retaining rows in a model.matrix where
missing values are present in the predictors. Ideally I'd be able to
retain these rows as zeros.
Thanks,
Jarrod
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
2014 Mar 07
0
R makepredictcall
That site, and that document in particular, had nothing to add on this particular topic.
So on to question 2. I think the material is useful. If I write it up will that be
welcome/tolerated/ignored addition to the R docs?
On 03/07/2014 05:00 AM, r-devel-request at r-project.org wrote:
> See the developer site, e.g.
> http://developer.r-project.org/model-fitting-functions.txt .
>
2007 Dec 03
3
restore NAs in residuals
Dear All,
I have two vectors:
tt = c(6.87, 7.43, 6.4, 4.5, 5.5, 5.87, NA, NA, NA, 7.7)
year = 1966:1975
Residuals
lm(tt~year)$res
do not contain NAs for the three years of missing temperature tt. Is there a
simple way to get these NAs back into the residual's vector?
Thank you,
Sorama
[[alternative HTML version deleted]]
2003 Jan 30
2
mgcv, gam
Hola!
I have some problems with gam in mgcv. Firts a detail: it would
be nice igf gam would accept an na.action argument, but that not the
main point.
I want to have a smooth term for time over a year, the same pattern
repeating in succesive years. It would be natural then to impose
the condition s(0)=s(12). Is this possible within mgcv?
I tried to obtain this with trigonometric terms, aca:
2003 Dec 09
1
documentation fixes (cvs) (PR#5632)
The patch below attempts to correct some unclear sentences in the R
documentation.
In the case of coplot.Rd it wasn't clear whether "shingle" bar had a
special meaning or was a typo for "single". I've just put a comment in
that case.
regards
--
Brian Gough
Network Theory Ltd -- Publishing Free Software Manuals
15 Royal Park
Bristol BS8 3AL
United Kingdom
Tel: +44
2011 Feb 25
0
R 2.12.2 is released
I've rolled up R-2.12.2.tar.gz a short while ago. This is an update release, which fixes a number of mostly minor issues, and one major issue in which complex arithmetic was being messed up on some compiler platform.
You can get it from
http://cran.r-project.org/src/base/R-2/R-2.12.2.tar.gz
or wait for it to be mirrored at a CRAN site nearer to you.
Binaries for various platforms will
2011 Feb 25
0
R 2.12.2 is released
I've rolled up R-2.12.2.tar.gz a short while ago. This is an update release, which fixes a number of mostly minor issues, and one major issue in which complex arithmetic was being messed up on some compiler platform.
You can get it from
http://cran.r-project.org/src/base/R-2/R-2.12.2.tar.gz
or wait for it to be mirrored at a CRAN site nearer to you.
Binaries for various platforms will
2003 Dec 12
0
proofreading corrections (cvs) (PR#5730)
Here is a patch of changes from the proof-reading of the R reference
manual, made against the current cvs.
regards
--
Brian Gough
Network Theory Ltd -- Publishing Free Software Manuals
15 Royal Park
Bristol BS8 3AL
United Kingdom
Tel: +44 (0)117 3179309
Fax: +44 (0)117 9048108
Web: http://www.network-theory.co.uk/
Index: src/library/base/man/Arithmetic.Rd