Displaying 20 results from an estimated 2000 matches similar to: "missing value"
2006 Jul 11
2
new object
Um texto embutido e sem conjunto de caracteres especificado associado...
Nome: n?o dispon?vel
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20060711/1da40382/attachment.pl
2006 Sep 20
5
multiple lines and plot
Hi. Please, how can I put together 2 or more lines at the same
scatterplot ? Example: measures of protein intake (quantitative) of 4
children over 30 days, by day. How to plot all children at same graphic:
Protein X Time ? Is there any command like "overlay" ?
Thank you,
Mauricio
2007 Jan 25
7
filling the area
Please, how to fill the area under the curve?
x <- c(1:10)
y <- c(rnorm(10))
plot(x,y)
lines(x,y)
Thanks,
Mauricio Cardeal
2005 Oct 19
3
npmc package
Hi
Does anyone know where is the package: npmc (Nonparametric Multiple
Comparisons).
I found the reference on R Site Search, but not the package itself on
CRAN as suggested.
Thanks
Mauricio
2005 Sep 13
11
if() command
Hi everyone !
Could you please help me with this problem ?
I??ve trying to write a code that assign to a variable the content from
another, but all I??ve got is a message error. For example:
if (age <=10) {group == 1}
else if (age > 10 & age <= 20) {group == 2}
else {group == 3}
Syntax error
Or
if (age <=10) {group == 1}
else (age > 10 & age <= 20) {group == 2}
2004 Feb 11
6
lapply and dynamically linked functions
Hi all,
I'm trying to use lapply on a list with the following command:
out<-lapply(mylist,myfun,par1=p,par2=d) (1)
where
myfun<-function(x,par1,par1) {.....} (2)
now this function is in fact a wrapper for some Fortran code I have
written so I think this might be the problem. When I call lapply() as in
(1) I get the following message:
Error in get(x,
2004 Feb 29
7
Proportions again
Hello.
I asked before and it was great, cause as a beginner I learned a lot. But, if I have this in R (1 and 2 are codes for sex):
> sex<-c(1,2,2,1,1,2,2,2)
> sex
[1] 1 2 2 1 1 2 2 2
I´d like to obtain the proportion according to sex.So I type:
> prop.table(sex)
[1] 0.07692308 0.15384615 0.15384615 0.07692308 0.07692308 0.15384615 0.15384615
[8] 0.15384615
The result is OK, but I
2006 Jul 06
2
questions on data management
Dear friends,
suppose i have two datasets: A and B
A:
id<-1:6
x<-c(1,2,3,4,5,6)
y<-c(2,4,6,8,3,2)
xy<-data.frame(id,x,y)
B
m<-c(1,1,3,3,5,5)
n<-c(2,2,6,6,3,3)
mn<-data.frame(m,n)
Now, i want to perfomr two tasks:
1. get a subset of B,no duplicate values,:
C:
m n
1 2
3 6
5 3
2.Extract the values in A on the conditions that x=m and y=n
the results should be:
id x y
1 1 2
3
2006 Jul 18
2
A contingency table of counts by case
Here is an example of the data.frame that I have,
df<-data.frame("case"=rep(1:5,each=9),"id"=rep(1:9,times=5),"x"=round(runif(length(rep(1:5,each=9)))))
"case" represents the cases,
"id" the persons, and
"x" is the binary state.
I would like to know in how many cases any two persons
a. both have "1",
b. the first has
2005 Dec 13
1
sample matrix as a new object
Please, I??d like to store this sample matrix as a new object. How can I
do this ?
pulse <- c(67, 67, 68, 68, 68, 69, 69, 69, 69, 69, 70, 70, 70, 70, 71,
71, 72, 72, 73, 74)
m <- NULL
x <- 0
for (i in 1:5)
{
x <- sample(pulse,3)
m <- mean(x)
cat(x,m,"\n")
}
Thanks,
Mauricio
2006 May 03
2
mca id numbers
Is it possible to make disappear the id numbers from scatter.dudi (mc
analysis) ?
a <- as.factor(c(1, 2, 3, 2, 1))
b <- as.factor(c(3, 2, 3, 1, 1))
x <- as.factor(c(1, 2, 2, 1, 3))
y <- as.factor(c(2, 2, 3, 1, 1))
dat <- data.frame(a=a, b=b,x=x,y=y)
summary(dat)
dat
require(ade4)
dat.acm <- dudi.acm(dat, scann = FALSE, nf = 2)
scatter.dudi(dat.acm)
Thank you very much !
2006 Sep 26
2
Vectorise a for loop?
Hi R guru coders
I wrote a bit of code to add a new column onto a "topTable" dataframe.
That is a list of genes processed using the limma package. I used a for
loop but I kept feeling there was a better way using a more vector
oriented approach. I looked at several commands such as "apply", "by"
etc but could not find a good way to do it. I have this feeling there
2006 May 03
1
Breaking a matrix into parts
Hi,
I've a matrix in 20*11 order. There are 11 variables,
i.e 11 columns and each variable have 20 row data. Now
i want to calculate covariance between any variable
with others taking 4 rows at a time, so that there
will be 5 blocks. How can i do this using any
R-function? If i want to do it in any 'loop' function?
Thanks a lot,
SB.
2006 May 03
3
Giving Error
I tried your code, but it's giving the following
error..
Error in match.fun(FUN) : argument "FUN" is missing,
with no default
2006 May 11
2
Break Matrix
Hi All,
I have a (331*12) matrix. I wan t to braek it into 28 parts each window having 12 rows, so that each matrix become (12*12) matrix. How can i do this.
Thanks,
Sumanta.
---------------------------------
Send instant messages to your online friends - NOW
[[alternative HTML version deleted]]
2006 May 18
1
Function (x) as consecutive values
Hi - I'm trying to avoid using a 'for' loop due to inefficiency and instead use a function (and ultimately tapply as I'm working on a matrix) but I can't figure out how to get 'function' to take the variables as anything other than vectors for example
aa<-0
x<-1:4
test.fun<-function(x)
{aa<-(x*x +aa)
return(aa)}
test.fun(1:4)
This code
2006 Jun 06
2
SPSS variable lables import
Hi,
I try to get the variable labels of a SPSS data file into R but don't
find this mentioned in the help file for foreign. Is there another way
to get them ?
BTW: An SPSS variable name is like: VAR001, whereas the variable label
might be 'Identification no.'
Thanks in advance,
F. Thomas
--
..........................................
Dr. Frank Thomas
FTR Internet Research
93110
2006 Jun 13
1
plotting gaussian data
Ok I guess it's time to ask.
So I want to plot my data. It's my data from a frequency table, "temp". My
formula is just a Gaussian eq. I have done the nls function to get my
parameters and now I want to do the whole plot (...) and then lines(..)
This is what I have done.
> temp
bin x
1 -4.0 0
2 -3.9 0
3 -3.8 0
4 -3.7 0
5 -3.6 0
6 -3.5 0 .... and so
2006 Jul 10
1
How to include NA's of a factor in table?
Dear All,
Is there a better way to include NA's of a factor in the output of table()
than using as.character()?
Admittedly, I do not understand the help page for table concerning the
exclude argument applied to factors. I tried in different ways, but could
not get NA to be included in the table, if not using as.character() (see
example).
Greetings,
Heinz
## example
fcv <-
2006 Jul 11
1
Table of P values for Fisher's exact test
Hi,
I have a table of observed counts for various genetic markers. Instead of
doing Fisher's exact test for each marker one at a time and recording the P
value manually, is there a script to go through the whole list and generate
the P value column automatically?
An example of my data:
Counts_CHB and Counts_AA are the observed counts for one allele.
2N_CHB and 2N_AA are the total number