Displaying 20 results from an estimated 30000 matches similar to: "R-alpha: two-sided to one-sided formula"
1997 Sep 10
2
R-alpha: model.matrix misbehaves on two-sided formulas
I am using R for a graduate class on linear models that I teach. I
sent the class a sample transcript of explicit construction of the
model matrix and use of the QR decomposition. One of the members of
the class picked up on the fact that the model matrix was not what I
advertised that it should be when a two-sided formula is used. A
one-sided formula works properly. For example,
>
2007 May 10
1
t value two.sided and one.sided
Hi,
on a
> summary(lm(y~x))
are the computed t-values for two.sided or one.sided. By looking on some
tables they seem like they are for two.sided. Is it possible to have them
for one.sided? If this makes sense...
Thanks.
[[alternative HTML version deleted]]
2008 Mar 10
2
source() behavior I don't understand
temp.ttt <- "ttt <- 1\nttt"
conn.ttt <- textConnection(temp.ttt)
source(conn.ttt, echo=TRUE) ## name of variable is echoed
close(conn.ttt)
cat(file="c:/temp/temp.R", temp.ttt) ## name of variable not echoed
source("c:/temp/temp.R", echo=TRUE)
temp.abc <- "abc <- 1\nabc"
conn.abc <- textConnection(temp.abc)
source(conn.abc, echo=TRUE)
2018 May 01
0
How would I color points conditional on their value in a plot of a time series
You may also want to check this out:
plot(ttt, type = "p")
points(ttt, col = ifelse(ttt < 8, "black", "red"))
Eivind K. Dovik
Bergen, NO
On Tue, 1 May 2018, Christopher W Ryan wrote:
> Excellent! Worked like a charm. Thanks.
>
> --Chris Ryan
>
> On Tue, May 1, 2018 at 4:33 PM, William Dunlap <wdunlap at tibco.com> wrote:
>
>> The
2018 May 01
2
How would I color points conditional on their value in a plot of a time series
Excellent! Worked like a charm. Thanks.
--Chris Ryan
On Tue, May 1, 2018 at 4:33 PM, William Dunlap <wdunlap at tibco.com> wrote:
> The ts method for plot() is quirky. You can use the default method:
>
> plot(as.vector(time(ttt)), as.vector(ttt), type = "p", col=ifelse(ttt<8,
> "black", "red"))
>
>
> Bill Dunlap
> TIBCO Software
2018 May 01
2
How would I color points conditional on their value in a plot of a time series
How would I color points conditional on their value in a plot of a time
series. Something like this:
## demonstration data
ttt <- ts(rpois(12, lambda = 8), start = c(2000, 1), freq = 4)
ttt
plot(ttt, type = "p")
## doesn't work--all points the same color
plot(ttt, type = "p", col = ifelse(ttt < 8, "black", "red"))
## also doesn't work--all
2018 May 01
0
How would I color points conditional on their value in a plot of a time series
The ts method for plot() is quirky. You can use the default method:
plot(as.vector(time(ttt)), as.vector(ttt), type = "p", col=ifelse(ttt<8,
"black", "red"))
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Tue, May 1, 2018 at 1:17 PM, Christopher W Ryan <cryan at binghamton.edu>
wrote:
> How would I color points conditional on their value in a plot
1998 Apr 07
3
R-beta: spline problems(?)
Hi,
I am a total beginner with this whole thing so please have patience!
I am trying to run an S-plus program with a certain line:
spline(1:nrow(y), y[,1],n=100);
This crashes with:
Error: NAs in foreign function call (arg 8)
Apparently, this is caused by the last command of spline:
u <- seq(xmin, xmax, length.out = n)
.C("spline_eval", z$method, length(u), x = u, y =
2004 May 20
2
Get Slot from a Class
Hello, everyone,
I don't quite understand the following message:
> TTT <- t.test(1:10, y=c(7:20))
> class(TTT)
[1] "htest"
> TTT@p.value
Error: Trying to get slot "p.value" from an object whose class ("htest") is not defined
> TTT$p.value
[1] 1.855282e-05
Why the message says the class of TTT is not defined while class(TTT) gets
2006 Nov 22
1
question about the "solve" function in library "Matrix"
Hi:
I have some problems when I use the function "solve" function in a loop. In the following code, I have a diagonal martix "ttt" whose elements change in every iteration in a loop. I defined a "dpoMatrix"class before the loop so I do not need to define this class every time in the loop. The reason is to save some computing time. The code is below. The inverse
2012 Mar 14
1
[ESS] completion in [] (R internal completion fails)
Hello,
I am forwarding this from ESS mailing list, as it's a failure of
internal R completion system:
This fails:
utils:::.assignLinebuffer('iris[iris$Spec')
utils:::.assignEnd(15)
utils:::.guessTokenFromLine()
utils:::.completeToken()
utils:::.retrieveCompletions() ## -> [1] "iris[iris$Spec"
This works
utils:::.assignLinebuffer('iris[ iris$Spec') # note the
2009 Jul 10
1
getting a timeseries element into a string
I have a timeseries object, ts, and want to get the first date in the series
into a string so I can concatenate it with a SQL query. Input and output are
shown below. I must be missing something very basic, but I can't seem to
pry the data ("2008-07-01") into a string variable. Any suggestions would
be appreciated.
Thank you,
Andrew
=====script:
class(ts)
(ts[1,0]) #returns
2006 Feb 06
5
lme4: Error in getResponseFormula(form) : "Form" must be a two sided formula
I'm sure I'm being stupid so flame away...
R2.2.1 on Windoze (boohoo) latest updates of packages.
I'm exploring a dataset (land) with three variables looking at an
narrowly unbalanced two group (GROUP) ANCOVA of a randomised
controlled trial analysing endpoint score (SFQ.LOCF.ENDPOINT) entering
the baseline score (SFQ.BASELINE) as covariate and the following work
fine:
> res.same
2010 May 07
2
Problems with the IMAP proxy after upgrading from dovecot 1.1.16 to 1.211
We have frequent timeout problems after upgrading our imap servers
from dovecot 1.1.16 to dovecot 1.2.11. One server acts as proxy only,
and the other one is the "real" imap server". The credentials for the
proxy service are stored in a remote MYSQL database.
There were no trouble with dovecot 1.1.16. But now, with the most
recent version, we get frequent login failures. It
2002 Nov 18
3
Problems copying digital images to Samba Share
I am trying to copy some digital images to a directory on my Redhat 7.3
Samba 2.2.3a-6 server and am getting extra files in the directory. I
have included my SMB.Conf file contents below in case that is relevant.
The files being copied reside on a Windows 2000 workstation and were
created by Jasc Image robot. These files would have been accessed by
both a Windows 2000 machine as well as a Windows
2010 Apr 02
1
can't read excel file with read.xls()
Hi, I encountered a problem of not being able to read in an excel spreadsheet using read.xls() in the xlsReadWrite package. can anyone help? Here is an example code
write.xls(matrix(1:9,nrow=3),"ttt.xls")
read.xls("ttt.xls")
Error in read.xls("ttt.xls") :
Unexpected error. Message: Can't find the file "ttt.xls"
The "ttt.xls" file was
2007 Jun 21
1
Recycle bin and ACL
Hello,
we are using the vfs module recycle with the following config:
vfs objects = recycle
recycle: repository = .Papierkorb
recycle:directory_mode = 0777
recycle:subdir_mode = 0777
recycle: keeptree = Yes
recycle: exclude = *.tmp, *.temp, *.log, *.ldb
recycle: exclude_dir = tmp
recycle:versions = Yes
Problem is that everybody can see deleted documents in the
recycle bin.
But if I set
2012 Jul 11
2
nls problem: singular gradient
Why fails nls with "singular gradient" here?
I post a minimal example on the bottom and would be very
happy if someone could help me.
Kind regards,
###########
# define some constants
smallc <- 0.0001
t <- seq(0,1,0.001)
t0 <- 0.5
tau1 <- 0.02
# generate yy(t)
yy <- 1/2 * ( 1- tanh((t - t0)/smallc) * exp(-t / tau1) ) + rnorm(length(t))*0.01
# show the curve
2004 Jan 21
2
subset select within a function
Dear all,
I'd like to subset a df within a function, and use select for choosing
the variable. Something like (simplified example):
mydf <- data.frame(a= 0:9, b= 10:19)
ttt <- function(vv) {
tmpdf <- subset(mydf, select= vv)
mean(tmpdf$vv)
}
ttt(mydf$b)
But this is not the correct way. Any help?
Thanks in advance
Juli
2006 Oct 20
6
summing elements in a list of functions
Dear all,
I have looked for an answer for a couple of days, but can't come with any
solution.
I have a set of functions, say:
> t0 <- function(x) {1}
> t1 <- function(x) {x}
> t2 <- function(x) {x^2}
> t3 <- function(x) {x^3}
I would like to find a way to add up the previous 4 functions and obtain a new
function:
> rrr <- function(x) {1+x+x^2+x^3}
without,