Thank you, this works very well. My only remaining question about this is
about how ifelse is working; I understand the basic syntax (df$condition2
gets assigned the value *runif(nrow(df1[df1$condition1<=1,]),0,1)* or the
value *df$condition1* depending on whether or not df$condition1 meets the
cri
I spent some time on this simple question, also searched the forum,
eventually hacked my way to an ugly solution for my particular problem but I
would like to improve my coding:
I have data of the form:
df <- expand.grid(group=c('copper', 'zinc', 'aluminum', 'nickel'),
condition1=c(1:4))
I would
Hi
I have data for events in rows, with columns for person and date. Each
person may have more than one event;
tC <- textConnection("
Person date
bob 1/1/00
bob 1/2/00
bob 1/3/00
dave1/7/00
dave1/8/00
dave1/10/00
kevin 1/2/00
kevin 1/3/00
kevin 1/4/00
")
data <- rea
Well at this point I have what I need (rough plot for data exploration) but
the simplicity of the first approach is quite elegant and it has become a
learning project. I have succeeded in formatting the overall plot OK but
have not been able to solve the problem of titles or any kind of
label/legen
This solution works really nicely & I learned much by working through it.
However but I am having trouble with subplot formatting; setting
main=d$Subject results in the correct title over each plot but repeated
multiple times. Also I can't seem to format the axis labels and numbers to
reduce the sp
Hello, I have longitudinal data of the form below from N subjects; I am
trying to create figure with N small subplots on a single page, in which
each plot is from only one subject, and in each plot there is a separate
curve for each value of param1.
So in this case, there would be four plots on t
Hello,
I have a large dataset of the form
subj var1 var2
001100200
001120226
001130238
001140245
001150300
002110205
002125209
003101233
003115254
I would like to perform linear regression of var2 on var1 for each subj
Hi,
I have tab-delimited data with an unequal number of entries per column, of
the sort:
A B C
1 2 2
3 4 1
5 2 2
6 2
5 2
3
6
2
I would like to make a histogram of the frequencies of each represented
number in a "stacked" histogram, where you can see the contribution of eac
Thanks for the input
Adding "print" took care of the first problem. The output looks like what I
would expect, so I think the code is doing what I would like it to for the
first 44 observations.
> print(results.df)
DR D.1 R.1 V1V2dif V1V4dif
1 68.92500 75.00
Hi all,
I have a short R code file that I am using to perform calculations on a
dataset. I am having a few issues with output:
1. Although my input data file is 2149 lines long, when I type "results.df"
from the command line, I get the appropriate calculation results for only
the first 46 rows.
Hi Guys,
stumped by a simple problem. I would like to take a file of the form
Pair group param1
1 D 10
1 D 10
1 R 10
1 D 10
2 D 10
2 D 10
2 D 10
2
Hello,
I am new to R and am having difficulty formatting numerical output from a
regression analysis. My code iteratively performs linear regression on a
dataset while excluding certain data ranges.
My code:
rm(list = ls(all = TRUE))
sink("outfile")
dat <- read.table("testdat", sep="\t", header
12 matches
Mail list logo