Displaying 20 results from an estimated 75 matches for "gustaf_rydevik".
2009 Dec 14
6
write.csv and header
Dear list,
I would like to export a matrix to a TXT-File by using write.csv (not
necessarily). Is there a way to add a header (with additional
informations concerning the project) spanning multiple lines to this
file before the actual data are listed up? Should look like this:
date:
filename:
number of permutations:
------------
data (as a matrix)
Any suggestions? Thnx in advance.
2008 Nov 05
2
Simple rep() question duplicating times and dates.
I want to create a data.frame of time and date for a year. I started with the idea of simply producing two vectors (time and date)
The first part ( time) is easy.
rep(1:24, 365)
But how do I get a series of 24 dates for O1 January 2005 and repeat this to 31 December 2005.
It should be easy but I don't see it.
Thanks
2010 Jun 03
2
moving average on irregular time series
...begin", "Event"
), row.names = c(NA, 20L), class = "data.frame")
###In this example, row 18 is a date less than 14 days after an event
and should be marked for removal.
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
2008 May 23
2
Preparing high quality figures with tiff as end result
...know how to solve this.
So basically my question is: How should I go about generating graphics
that will look as nice as possible given the above constraints?
Many thanks in advance,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
2008 Jan 09
7
An "R is slow"-article
...agree (granted, I can't really write C), it was
interesting to read something from a very different perspective than
I'm used to.
Best regards,
Gustaf
_____
Department of Epidemiology,
Swedish Institute for Infectious Disease Control
work email: gustaf.rydevik at smi dot ki dot se
skype:gustaf_rydevik
2008 Apr 08
1
Change the position of panel strips in a lattice plot.
...h" appear below the subgraphs, instead of above?
I've been looking through the lattice documentation and the list
archive but have not found such a thing.
Many thanks in advance,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
2009 Feb 11
3
Generating Numbers With Certain Distribution in R
Dear all,
Is there a way to generate K numbers of integer (K = 10^6).
The maximum value of the integer is 200,000 and minimum is 1.
And the occurrences of this integer follows
a lognormal distribution.
- Gundala Viswanath
Jakarta - Indonesia
2008 Dec 11
3
getting ISO week
...,
ifelse((jan1.wday==5|(jan1.wday==6 &LY.prev)),53,52),
ifelse(Yn==Y+1,1,(date.yday+(7-date.wday)+(jan1.wday-1))/7-(jan1.wday>4))
)
return(list(Year=Yn,ISOWeek=Wn))
}
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
2010 May 02
2
Set encoding when load()-ing workspaces?
...omewhere?).
The second time, I mailed R-Sig-Mac, got some tips that unfortunately
did not lead anywhere, and subsequently gave up. I hope third time's a
charm!
Many thanks in advance,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
2007 Sep 14
3
x-axis order
...week numbers, ordered as in the data?
Thanks in advance,
Gustaf
---
x<-c(26:52,1:25)
y<-rnorm(52)+1:52
plot(x,y) ## How do I get the x axis to be ordered by the current
ordering of x?
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
2007 Oct 10
2
download.file not working
...dt
"1.7-5"
> Sys.getlocale()
[1] "LC_COLLATE=Swedish_Sweden.1252;LC_CTYPE=Swedish_Sweden.1252;LC_MONETARY=Swedish_Sweden.1252;LC_NUMERIC=C;LC_TIME=Swedish_Sweden.1252"
>
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
2009 Jan 20
1
two-sample test of multinomial proportion
...eplace=TRUE),]))
props1[i]<-sub.tab[1,1]/(sub.tab[1,1]+sub.tab[1,2])
props2[i]<-sub.tab[2,1]/(sub.tab[2,1]+sub.tab[2,2])
}
sub.kvot<-props1/props2
sort(sub.kvot)[50]
sort(sub.kvot)[950]
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
2007 Sep 28
2
Is there a model like that in R?
Hi to everyone,
I am starting to work with a model that is not familiar to me.
The model would be like that:
y = . - a*max(Q(i) - Q(0), 0) + .
where Q(i) is the accumulated effect of a variable at time i and Q(0) a
threshold above it there is effect on y. The value of Q(i) could be
estimated as:
Q(i+1) = Q(i) + b*max(s(i) - s(0), 0) + c*min(s(i) - s(0), 0) + .
Where s
2008 Oct 24
1
Automatically adjust text size in plot
...hanks in advance,
Gustaf
PS: As an alternative, if someone could come up with a better way do
display this type of data, I'd be all ears. I'm not too happy with my
current solution....
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
2009 Jan 16
2
data frames with å, ä, and ö (=non-ASCII-characters) from windows to mac os x
...;, "9", "10", "11", "12", "13", "14", "15",
"16", "17", "18", "19", "20"))
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
2007 Oct 10
3
as.dist with diagonal unequal zero
Hello and sorry that I still haven?t found a solution for my problem.
I need to extract the lower and upper triangle from a square matrix
including the diagonal. This diagonal is not zero in that special case.
I tried with as.dist
w<-as.dist(w, diag = TRUE)
> w
1 2 3 4 5
1 0
2 2 0
3 3 8 0
4 4 9 14 0
5 5 10 15 20 0
but found no way to keep the diagonal that is in the
2007 Sep 19
2
function on factors - how best to proceed
Sorry about this one being long, and I apologise beforehand if there
is something obvious here that I have missed. I am new to creating my
own functions in R, and I am uncertain of how they work.
I have a data set that I have read into a data frame:
> gctable[1:5,]
refseq geometry X60_origin X60_terminus length kingdom
1 NC_009484 cir 1790000 773000 3389227 Bacteria
2
2008 Oct 07
1
FW: Reading Data
...txt", header=T) ## If the date row is supposed to be
variable names.
3)
read.table("data.txt",skip=1) ## If there are no headers, and you want
to ignore the date
regards,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE skype:gustaf_rydevik
[[alternative HTML version deleted]]
2007 Jul 13
2
The "$" operator and vectors
...t$vector
NULL
> Test$"A"
[1] 1 2
> Test[,vector]
[1] 1 2
Is there a reason for the $ operator not evaluating the vector before executing?
best,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451 /+46(0)8 760 52 93
address: C/O Rydevik, Syrenv. 12, 17851 Eker?, SE
skype:gustaf_rydevik
2007 Aug 30
1
t-test within tapply
Hello,
My data are as following:
Data <- data.frame(Ind=rep(1:3,c(10,10,10)),
Replicate=rep(c(rep("a",5),rep("b",5)),3),
EggSize=rep(rnorm(5,mean=10),6)
)
attach(Data)
Using a t-test, I want to check if the mean egg sizes are significantly
different between replicates a and b for each individuals