Displaying 20 results from an estimated 700 matches similar to: "Counting entries to create a new table"
2001 Oct 26
3
question about anova() output
Hello,
I am getting output from anova() and summary(aov()) that depends on the
order of the factors in the fitted model object, and this has me baffled. I
see this dependency with the data.frame below but not with an example (table
6.4) from Montgomery's DOE book. This is with R 1.3.0 on Debian GNU-Linux.
Where have I gone wrong?
> centerpts
run sample CH50mg
1 day1 dev126 0.56
2
2009 Jan 21
1
finding row and column indices of date in multiple columns of a data frame
Hi,
I have a data.frame SAMPLES with columns:
Site Site# Season Day1 Day2 Day3
Day1, Day2, Day3 are class "Date", the other columns are numeric or
factor.
I have a date "mydate" that may or may not be listed in my data.frame
and I need to find that out.
If "mydate" is there, I want to get the number of the data.frame row
where it occurs.
2007 Aug 17
1
finding the row(s) for a date in a data frame
Hi,
If I have a data frame A with the following format:
Day1 Day2 Day3 Day4
1 1979-11-02 1979-11-03 1979-11-04 <NA>
2 1979-12-06 <NA> <NA> <NA>
3 1979-12-13 1979-12-14 1979-12-15 1979-12-16
4 1979-12-20 <NA> <NA> <NA>
And a date "1979-12-14", for
2002 Nov 01
1
Reshape function
Can someone help me with the proper usage of the
reshape function?
Let's say I have a dataset with columns like this
(wide format):
Id Sex Group Test Day1 Day 2 Day 3...
And I want to transpose this into something like this
(thin):
Id Sex Group Test Time
Where the new column labeled time contains all the
time variables (Day 1, Day 2, Day 3...) that were in
the wide
2013 Apr 21
2
how to import several files every day
Hi All
I want to import several .dat files every day of the week from the same
folder.
Let say, on day 1, I have about 100 files in the folder.
By using this code, everything works perfectly (maybe there is a more
efficient way to do it):
filenames <-list.files(path="pathtofile", full.names=TRUE)
library(plyr)
import.list <- llply(filenames, read.table, header=TRUE,
2009 Jun 01
1
Reshaping Data
Hi,
i did a mistake with my first post.
I have to reshape data from this matrix:
id x1 x2 x3 x4 day1 day2 day3 day4 day5 day6 day7 day8 day9
1 0.129 0.797 0.231 0.615 4 4 1 1 1 1 3 3 3
2 0.420 0.376 0.501 0.282 4 4 4 4 5 4 2 5 5
3 0.377 0.486
2006 May 31
0
Ruby on Rails Workshop in Kansas City !
Ruby on Rails Workshop
------------------------------------
Kansas City Ruby User''s Group (http://kcrug.org/) proudly presents the first "Ruby on Rails Workshop" for those eager to get started into Ruby on Rails. This one-and-half-day workshop will offer a quick introduction to Ruby and the Ruby on Rails web application framework.
Sponsored by Reevik, Inc., it will
2007 Apr 19
4
general question about plotting multiple regression results
Hi all,
I have been bumbling around with r for years now and still havent come up
with a solution for plotting reliable graphs of relationships from a
linear regression.
Here is an example illustrating my problem
1.I do a linear regression as follows
summary(lm(n.day13~n.day1+ffemale.yell+fmale.yell+fmale.chroma,data=surv))
which gives some nice sig. results
Coefficients:
2012 Mar 15
1
Bar graph with 2 Y axis
Dear R users,
I need to draw a barplot with 2 Y axis. I have 3 days each of wich having 2 groups (and error bar for each of them). The height of the 3rd day is too tall compared to others. That's why I have to use a second Y axis for that. I am using "barplot2" function of "gplots" library (to be able to add error bars as well). Data and codes currently I am using is
2008 Jul 31
2
S 3 generic method consistency warning please help
I would like to include this in a package. The S3 methods on R CMD check
says
* checking S3 generic/method consistency ... WARNING
window:
function(x, ...)
window.chron:
function(data, day1, hour1, day2, hour2, ...)
See section 'Generic functions and methods' of the 'Writing R Extensions'
manual.
I have looked and can not figure it out. This function is for convience.
What
2013 Jan 17
1
plotting from dataframes
thanks to your guys help I am closer to solving my problem but I have some
small problem. So let's say I start with
>data
number day hour
1 17 10
2 17 11
3 17 6
4 18 4
5 18 10
6 19 8
7 19 8
I want to split to odd days, which I am able to do, I call this object
frames, which looks like:
> frames
$`1`
c1 day1 hour1
1 1 17 10
2 2 17 11
3 3 17 6
$`2`
c1 day1
2009 Sep 11
1
help with plotting
HI all,
raw_urine =
read.table("Z:\\bruce.9.3.09.sample.stability.analysis\\urine\\mz.spot.sam.dat.new",
header = TRUE )
pvalue =
read.table("Z:\\bruce.9.3.09.sample.stability.analysis\\urine\\all.urine.features.t.test.result",
header = TRUE )
library(compositions)
p = function(a,b){
y = pvalue[,a]
if(y<0.01){
index = which(y, arr.ind=TRUE)
day1 = raw_urine[index,3:7]
day2 =
2010 May 21
4
indexing problem
Dear group,
Here is my environment :
> ls()
[1] "l" "PLglobal" "Pos100415" "Pos100416" "Pos100419"
"Pos100420" "position" "select" "Trad100415" "Trad100416"
"Trad100419" "Trad100420" "trade" "y"
With objects :
> l
[1]
2005 Jun 28
3
conversion
Dear List,
How can I convert a list with elements being character strings, like:
"c(1,2,3,4)", ?c(1,3,4,2) ? to a list with elements as numerical
vectors: c(1,2,3,4), c(1,3,4,2)??
Thanks!
Anna
2008 Feb 18
2
R graphics question: "binary" bar chart
Hello!
I would like to visualize the hospitalization within one year of several
patients using a bar chart. For each patient the stay in a hospital
should be illustrated with a dark colour a if there is a stay at home
between 2 hopital stays, it should be illustrated with a bright colour.
e.g.
P1 |//////| |///| |////////|
P2 |//////////|
P3 |//|
2006 Sep 14
2
ANOVA in R
Despite having used R on a daily basis for the past two years, I'm
encountering some difficulty performing an ANOVA on my data. What I'm trying
to do is the following:
Given data such as:
Day 1 Day 4 Day 8
2 7 2
3 2 8
3 4 7
6 6 8
1 3 4
I want to use ANOVA to determine
2012 Nov 01
2
Name assignment in for loop
Dear helpeRs-
I'm using a for loop to create a series of models.
I'm trying to assign a name to each model created,
using the loop index. The loop gets stuck at the name
of the model, giving the error "target of assignment
expands to non-language object". The linear model runs
without error; only the name is problematic.
Here is the current loop syntax. The use of dat
2004 Jun 15
8
a better smbstatus for monitoring samba ?
Hello,
does anyone know if there is a tool in existence that can monitor samba shares like smbstatus
but is much more advanced (and runs in console) , I mean a tool that has menues, some search
options, and things sorted out nice. A Samba realtime monitor would be the best thing with lots
of details and lots of options.
I tried Swat, but that aint really a solution to watch who is connected
2015 Jan 29
2
any valid up-to-date info about Kamailio-Asterisk integration ?
Hi all
Have recently watched Matt Jordan's session on Kamailio World 2014
On slides 26-29 of his presentation
(http://www.kamailio.org/events/2014-KamailioWorld/day1/09-Matt.Jordan-Asterisk12-And-PJSIP.pdf)
he speaks about a (completely new, for me at least) approach to build
scalable telephony systems, using N instances of Kamailio and N
instances of Asterisk
Are there any
2011 Dec 06
1
Writing out in loops
I would like to write some data to different files. I can create the
filename Day1.txt like this:
filen <- paste("Day", l, ".txt", sep="")
and then I'm using a For loop to write out one row of a matrix,
something like this:
For (j in 1:10)
{
cat(mat[1,j], ",", file=filen, append=TRUE)
}
cat("\n", file=filen, append=TRUE)
but is there