Displaying 20 results from an estimated 2000 matches similar to: "basic questions: any place for them"
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:
2005 Feb 12
3
data.frame into list by columns; merge and row.names
Hi
a)
I want to make a list out of a data.frame, where each element of the
list is a column of the data.frame.
I looked in the archives and saw a lot of postings but surprsingly
none elucidated me. I also tried the split, aggregate help files and
counldn't see any easy way to do this. I wouldn't be surprised if
it's there, but I really didn't see it.
I solved the problem
2005 Feb 26
1
reshape without timevar argument?
Hi
I have a data.frame with 2 columns. The first column is an ID column.
The other columns are description of the ids. There is more than one
description for each Id.
Want I want to get as a value is a data.frame where each row
corresponds to one ID and has as many columns as different
descriptions.
I have used a very convoluted step, but I'm very convinced there is
an easier way to do
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
2004 Feb 24
1
Accessing columns in data.frame using formula
Hello!
I'm trying the hard way to use a formula, in a function, to specify the
names of several important columns in a data.frame. Maybe I'm just battling
to figure out the right search terms :-( This is on XP, R 1.8.1.
So, for instance,
wery[1:5,]
V1 V2 V3 V4 V5 congr V7 V8 V9 ok RT
1 1 1 960 520 1483 c 1 r r 1 760
2 1 2 1060 450 3753 c 1 r r 1 555
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
2004 Nov 23
4
data.frame into vector
Hi
I want to extract a row from a data.frame but I want that object to
be a vector . After trying some different ways I end up always with a
data.frame or with the wrong vector. Any pointers?
x <- data.frame(a = factor(c('a',2,'b')), b = c(4,5,6))
I want to get
"a" "4"
I tried:
as.vector(x[1,])
a b
1 a 4
(resulting in a data.frame even after in my
2005 Mar 18
3
extract rows in dataframe with duplicated column values
Hi
I want to extract all the rows in a data frame that have duplicates
for a given column.
I would expect this question to come up pretty often but I have
researched the archives and surprisingly couldn't find anything.
The best I can come up with is:
x <- data.frame(a=c(1,2,2,3,3,3), b=10)
xdup1 <- duplicated(x[,1])
xdup2 <- duplicated(x[,1][nrow(x):1])[nrow(x):1]
xAllDups <-
2004 Oct 01
3
Reading multiple files into R
I want to read data from a number of files into R.
Reading individual files one by one requires writing enormous amount of
code that will look something like the following.
****************
maptools:::dbf.read("wb-01vc.dbf")->dist1
maptools:::dbf.read("wb-02vc.dbf")->dist2
maptools:::dbf.read("wb-03vc.dbf")->dist3
2004 Jul 21
3
How to sort TWO columns ?
Dear ALL,
I fear my question has already been answered many times before, but I
haven't fund that in archives...
I am working on spatial datasets and, in most arrays I'm handling, there are
two columns dedicated to (x,y)-coords.
For different reasons - notably to draw image() plots, I need to have these
two columns sorted in increasing order.
But sort() and order() seem to apply to
2004 Aug 03
4
How to select a whole column? Thanks!
Dear all,
I hope to remove a whole column from a data frame or matrix (> 2000
columns). All value in the column are same. The first thing is to
select those columns.
For instance, I hope to remove the V3~6 column, for all the value in
those colume is zero.
V3 V4 V5 V6 V7 V8 V9 V10
1 0 0 0 0 0.000 0.000 0.000 0.000
2 0 0 0 0 0.000 0.000 0.000 0.000
3 0 0 0
2005 Jan 19
3
importing files, columns "invade next column"
Dear R-listers:
I want to import a reasonably big file into a table. (15797 x 257
columns). The file is tab delimited with NA in every empty space. I
have reproduced what I have used as my read.table instruction. I have
read the R-dataImportExport FAQ and still couldn't solve my problem.
(I might have missed it, of course). I'm using R.2.01 in a Mac G4,
10.3.7.
I can import the
2009 Jan 22
1
infer haplotypes phasing trios tdthap
Dear R mailing list,
I have a dataset with genotypes from trios and I would like to infer
haplotypes for each mother, father and child. The package that I could
find that can do this is tdthap.
But when the mother is homozygous (e.g., 2/2) the haplotype is called as
not possible to infer (0); I would prefer for it to call the genotype
(2). From what I understand it is doing what I would like
2004 Jun 11
2
running R UNIX in a mac computer
Hi to you all
My question is:
there is a package written in UNIX for which there is no Mac version.
I would like to know if it's possible to install the R UNIX version on the
MacOSX and run that UNIX package on my Mac (through this UNIX R Vresion on
a Mac)
I have seen a porfile for r version 1.8.1 on darwin:
http://r.darwinports.com/
is that it?
aother question related to that
if it's
2003 Oct 09
1
is.na(v)<-b (was: Re: Beginner's query - segmentation fault)
> -----Original Message-----
> From: Richard A. O'Keefe [mailto:ok at cs.otago.ac.nz]
<snip>
> The very existence of an "is.na<-" which accepts a logical
> vector containing FALSE as well as TRUE ...
And don't forget this is not the only usage of is.na<-. In fact it is
designed to take any valid indexing value. For example:
> a<-1:10
>
2003 Oct 15
2
Subseting in a 3D array
Hi!
I have a 3d array:
> dim(ib5km15.dbc)
[1] 190 241 19
and a set of positions to extract:
> ib5km.lincol.random[1:3,]
[,1] [,2]
[1,] 78 70
[2,] 29 213
[3,] 180 22
Geting the values of a 2D array
for that set of positions would
be:
> ima <- ib5km15.dbc[,,1]
> ima[ib5km.lincol.random[1:10,]]
but don't find the way for the case
of the 3D array:
>
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?");
}
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
2004 Sep 16
4
FW: How do I insert a newline in my title in a plot?
yes I have tries, and nothing. It just shows the strings with the slashn,
just like i typed it.
-----Original Message-----
From: Rashid Nassar [mailto:rnassar at duke.edu]
Sent: ÐÝì?ôç, 16 Óå?ôåìâñßïõ 2004 15:44
To: Christos Rodopoulos
Subject: Re: [R] How do I insert a newline in my title in a plot?
Have you not tried what you have already suggested:
title("this is a title\nIn 2