Displaying 20 results from an estimated 1000 matches similar to: "Accessing columns in data.frame using formula"
2003 May 28
1
Numbers that look equal, should be equal, but if() doesn't see as equal (repost with code included)
Hi!
Apologies for sending the mail without any code. Apparently somewhere along
the way the .R attachments got filtered out. I have included the code below
as clean as possible. My original mail is below the code.
Thank you again for your time.
regards,
Paul
vincentize <- function(data, bins)
{
if ( length(data) < 2 )
{
stop("The data is really short. Is that ok?");
}
2004 Jun 16
1
subset(..., drop=TRUE) doesn't seem to work.
Hello!
If I read ?subset, the workings of the argument drop (to me) seem to imply
equivalence of A and B (R 1.9.0):
#A
dd <- data.frame(rt=rnorm(10), c=factor(gl(2,5)))
dd <- subset(dd, c==1)
dd$c <- dd$c[, drop=TRUE]
table(dd$c)
1
5
#B
dd <- data.frame(rt=rnorm(10), c=factor(gl(2,5)))
dd <- subset(dd, c==1, drop=TRUE)
table(dd$c)
1 2
5 0
So to lose the second level of
2004 Aug 26
1
library(car) Anova() and Error-term in aov()
Dear all,
Type III SS time again. This case trying to reproduce some SPSS (type III)
data in R for a repeated measures anova with a betwSS factor included. As I
understand this list etc, if I want type III then I can do
library(car)
Anova(lm.obj, type="III")
But for the repeated measures anova, I need to include an Error-term in the
aov() call (Psychology-guide from Jonathan Baron)
2003 Oct 15
1
is.na(v)<-b (was: Re: Beginner's query - segmentation fault)
I think the thread ended up with several people (not only me)
feeling certain they didn't like `is.na<-` but with the
developers defending it and me not really understanding
why.
Uwe Ligges was going to come up with an example of
`<- NA` going wrong (sorry Brian R, I mean behaving
unexpectedly), but never did, and I think the problem
has been fixed. It was apparently a problem with
2003 Oct 16
1
Cbind warning message
Hello!
I'm not grasping why cbind (in the code below) warns that
Warning message:
number of rows of result
is not a multiple of vector length (arg 2) in: cbind(z, p)
when I do
sections <- function(length, parts)
{
p <- 1:parts
q <- length %/% parts
z <- array(p, dim=c(parts,q))
r <- length %% parts
if ( r > 0 )
{
p[r+1:length(p)] <- NA
z <-
2003 May 27
2
Numbers that look equal, should be equal, but if() doesn't see as equal
Hi!
After a lot of testing and debugging I'm falling silent in figuring out
what goes wrong in the following.
I'm implementing the Vincentizing procedure that Ratcliff (1979) described.
It's about calculating RT bins for any distribution of RT data. It boils
down to rank ordering your data, replicating each data point as many times
as you need bins and then splitting up the
2008 Mar 27
1
Dynamic string as element name in a list
Dear all,
I have a piece of code along the lines of
f <- function(x) {
clipname <- "LK" # but is in real determined based on info in data.frame x
# other manipulations
return( list(clipname=list(....)))
}
My intention is to do
out <- f(dat)
and then (in this example) having/getting
out$LK
which is a list in itself.
Of course, it doesn't work like this, but
2006 Sep 15
1
quotes
Hello!
I''m new on this list (and actually pretty new to redcloth also).
This e-mail is about the wery fine feature of converting quotes. I''m
norwegian, and we have our own qoutes: "?" and "?".
I therefore hacked this feature, so it is now in lib/redcloth.rb,
around line 404, so I now have:
[ /([^\s\[{(>#{PUNCT_Q}][#{PUNCT_Q}]*)"/,
2004 Jun 10
1
Informal discussion group about R
I've started a "tribe" for discussing R and
sharing scripts. Tribe.net is one of the popular
on-line social communities, like "Friendster".
Visit and see if it is a forum that you find useful.
To join the "tribe" you will need to register with
Tribe.net.
I hope it will be of help to newbies, although I'm
new to R myself.
Here is the url:
2004 Jun 16
2
subset and lme
I'm puzzled by the following problem, which appears when
attempting to run an analysis on part of a dataset:
If I try:
csubset <- dat$Diagnosis==0
cont <- lme(fixed=cform,
random = ~1|StudyName,
data=dat,subset=csubset,na.action=na.omit)
Then I get:
Error in eval(expr, envir, enclos) : Object "csubset" not found
But if I do
2005 Nov 23
0
Greenhouse-Geisser epsilon for interaction term
Hi,
I'm running a repeated measure ANOVA to test the effects of the
within-subjects
factors "congr", "isi" and their interaction, on the variable "latencies"
aov(latencies ~ congr*isi + Error(subj/(congr*isi)),data=dats)
"congr" has 4 levels, while "isi" has "3" levels.
I would like to check for possible violations of the
2007 Jul 04
2
Adding data to existing plot with new=TRUE does not appear to work
Dear all,
I am trying to shove a number of cmdscale() results into a single plot
(k=1 so I'm trying to get multiple columns in the plot). From ?par I
learned that I can/should set new=TRUE in either par() or the plot
function itself. However with the following reduced code, I get only a
plot with a column of data points with x==2.
plot(1,10, xlim=range(0,3), ylim=range(0,10),
2004 Aug 03
3
basic questions: any place for them
Hi
I have two basic questions, and here they go, but I was wondering as
well where can I ask these basic questions without bothering you
people
I've used Splus and now I'm using R and there's some functions that I
can't simply find
one:
sort.col
that allows data.frames to be sort by a given col
(I saw the funtion sort but that's for vectors. and I can't believe I
2020 Jul 07
2
[RFC]: mm,power: introduce MADV_WIPEONSUSPEND
On Fri 03-07-20 15:29:22, Jann Horn wrote:
> On Fri, Jul 3, 2020 at 1:30 PM Michal Hocko <mhocko at kernel.org> wrote:
> > On Fri 03-07-20 10:34:09, Catangiu, Adrian Costin wrote:
> > > This patch adds logic to the kernel power code to zero out contents of
> > > all MADV_WIPEONSUSPEND VMAs present in the system during its transition
> > > to any suspend
2020 Jul 07
2
[RFC]: mm,power: introduce MADV_WIPEONSUSPEND
On Fri 03-07-20 15:29:22, Jann Horn wrote:
> On Fri, Jul 3, 2020 at 1:30 PM Michal Hocko <mhocko at kernel.org> wrote:
> > On Fri 03-07-20 10:34:09, Catangiu, Adrian Costin wrote:
> > > This patch adds logic to the kernel power code to zero out contents of
> > > all MADV_WIPEONSUSPEND VMAs present in the system during its transition
> > > to any suspend
2002 May 15
3
graphics question
Hi
after browsing the documentation and web, I'm completely lost as how to
create the graph I describe below (as best as I can).
I've got 3 pairs of average response times: (390,396), (416, 421),
(406,415). Each of these pairs represents a level of a certain factor
(let's call it 'loc'), namely (in the same order), levels "c", "nc" and
"ni".
2004 May 17
3
Accessing data
Hello,
I would like to access my data frame without one variable.
E.g.:
> colnames(x)
[1] "Besch" "Ang.m" "Arb.m" "i10" "Umsatz" "arbstd"
I can try x[,-1], but this variable must be called by it??s name.
x[,-"Besch"]
x[,!"Besch"]
attach(x)
x[-Besch]
...
...
does not work.
I could not found a solution of
2011 Jul 27
1
dovecot and tcpwrappers
Hi,
I used dovecot 1.x for quite a while and it worked fine. However, I used it
through inetd and used hosts.allow/deny to restrict access to only certain
groups of systems.
Since yesterday I have dovecot 2.0.13. But in version 2.0.13 it seems that
starting using inetd doesn't work anymore : I only get a strange error
message if I try to connect using telnet :
telnet localhost imap
1998 Jun 17
1
Equal permissions for files and dirs (folders)
Hi!
Is there any way to have equal permissions for created files and
folders on samba's share?
This is what I have in my smb.conf file:
------------------
[izmenjava]
comment = Public z moznostjo pisanja
path = /home/izmenjava
browseable = yes
public = yes
writable = yes
printable = no
create mode = 0777
; create mode = 0664
-------------------------
Created
2010 Jun 10
1
printing in middle of an erb file
Hello,
I''m having a problem to output things in the right order with erb1.9
and lighttpd . I don''t know if it''s the normal behaviour of erb but
this is how it works for me:
Content of my ERB file: test{<%= 1 %>2<% puts 3 %>}
On my web browser I get this output:
3
test{12}
puts or print comes before any text.. Do you know wich function instead
of
puts