ages()),function(x)help.search('',package=X<-x,rebuild=T))
Now there is no error, but help.search cannot find anything - it seems
as if the database is empty.
Does anyone have experience with a similar error?
Best regards,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +44(0)74 253 760 42
add
roject.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Gustaf Rydevik, M.Sci.
tel: +44(0)74
On Tue, Oct 11, 2011 at 1:21 AM, David Winsemius wrote:
>
> On Oct 10, 2011, at 4:48 PM, Gustaf Rydevik wrote:
>
> Hi all,
>> some years ago, I sent a question to the mailing list regarding the WHO
>> anthro macros. Since I've now received three mails asking how I s
s are
original splus functions. Let me know if anyone gets problems in figuring
out how to use the files.
best regards,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +44(0)704 253 760 42
address:St John's hill 18/5 EH8 9UQ Edinburgh, UK
skype:gustaf_rydevik
__
On Wed, Jun 23, 2010 at 7:13 AM, Peter Dalgaard wrote:
> Gustaf Rydevik wrote:
>
>> Oh, I forgot to mention that the workaround of using as.double (or
>> as.numeric) works fine, and I've done that.
>> It's just that it can take quite a while (as in several hours
On Tue, Jun 22, 2010 at 7:50 PM, David Winsemius wrote:
>
> On Jun 22, 2010, at 1:33 PM, Gustaf Rydevik wrote:
> Cannot help you there, but have you looked at the help page for difftime?
>
> "The as.double method returns the numeric value expressed in the specified
> uni
On Thu, Jun 10, 2010 at 3:39 PM, Gustaf Rydevik
wrote:
> Hi all,
>
> The recent change in 2.11 that made as.numeric() return false on
> difftime-objects broke some of my code that calculated age classes of
> individuals using cut(). While this was no big thing to fix for me, it
rig.text<-c("01asap05a","02ee04b")
substr(orig.text,1,nchar(orig.text)-1)
Regards,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
__
R-help@r-project.org
Dear William and Gabor,
Both solutions worked, and my problem is now solved.
Many thanks to both of you!
regards,
Gustaf
>
> On Thu, Jun 3, 2010 at 10:23 AM, Gustaf Rydevik
> wrote:
>> Hi all,
>>
>>
>> I wonder if there is any way to calculate a moving avera
8 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
__
R-help@r-project.org mailing list
https://stat.et
l
Hope this is of help. I agree that it would be of interest to
incorporate OS-independent date management in R, but not being part of
the R development team, I'm not sure how to go about implementing
it...
Best regards,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essinget
is now on sale in the app store.
See
http://blogs.mathworks.com/desktop/2010/05/24/introducing-matlab-mobile-%E2%80%93-an-iphone-app-to-connect-remotely-to-your-matlab/
If matlab can do it, then surely the R community can as well.
Regards,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
addr
ed version.
Hopefully this will come in handy for someone searching the mailing
list archives in the future.
Best Regards,
Gustaf
#
## Inputs a date object, posix object, or 3 numbers and gives back the iso week.
## By Gustaf Rydevik, revised 2010
getweek<-function(Y,M=NULL,D=NULL){
mply errors in your data -
are you sure that there's not a better way of thinking about your
problem?
>From a practical standpoint, I would be sceptical about the ability of
most R-algorithms to generate theoretically valid p-values of such a
small order.
Best regards,
Gustaf
-
}
Best regards,
Gustaf
On Sun, May 2, 2010 at 8:36 PM, Prof Brian Ripley wrote:
> On Sun, 2 May 2010, Duncan Murdoch wrote:
>
>> Gustaf Rydevik wrote:
>>>
>>> Hi all,
>>>
>>> I hope that there is someone that can help me out here.
>>>
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
_
t; Any help would be greatly appreciated.
>
> Thanks in advance,
> Chris
> --
Hi,
This code is a bit ugly, but it works. Hope it helps.
/Gustaf
library(zoo)
test<-read.table("clipboard",header=T)
test$code<-paste(test$Name,test$Value,sep="")
drop.ndx<-rol
On Fri, Apr 23, 2010 at 11:14 AM, mhalsham wrote:
>
> Hi
> Yes I have managed to read the file (Table2.txt)
> The command I have used
> a<- read.table("table3.txt", fill=TRUE, header=FALSE)
> If I read the first row the result output will be like that.
> a[1,]
>
> Result would be
>
> V1 V
ncer V2 RAD54B
#6 Colon_cancer V3 PTPN12
#9 Colon_cancer V4 BCL10
#12 Colon_cancer V5
#15 Colon_cancer V6
#18 Colon_cancer V7
#21 Colon_cancer V8
#24 Colon_cancer V9
#1 Deafness V2EYA4
#4 Deafness V3 MYO7A
#7 Dea
tor(length=length(alldates))
for(i in seq_along(alldates)){
if(weekdays(alldates[i])=="Saturday"){
Week<-Week+1
}
if(substr(as.character(alldates[i]),6,10)=="05-01"){
Week<-1
}
allweeks[i]<-Week
}
SCHEDULE
On Tue, Apr 20, 2010 at 7:59 PM, Michael Hosack wrote:
>
> R experts,
>
> How could I extract the week number from a date vector (in Date class)
> such that week numbering (week 1...2...) begins (May 01) and ends
> (October 31) on the same specific dates each year? Week numbering
> must conform to
Hi tamas,
I am not sure what you mean by "downloaded" There is a lot of
random number generators built into R.
To generate 10 random numbers between 0 and 1, try
runif(10)
Regards,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,1
posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
Hi,
Does this do what you want?
temp<-read.table(url("http://n4.nabble.com/file/n1965378/y1.txt";))
hist(temp$V1,breaks=seq(0,5.1,by=0.1))
abline(v=2
e you tried to enter "matrix power" in rseek.org, clicking on
support list, and then clicking on the second link?
Regards,
Gustaf
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
b <- zoo(matrix(rep(2, 16000), ncol=16))
colnames(b) <- SDnames
data <- merge(a, b)
MyFunc <- function(x, ret, stdev){
if(any(is.na(c(x[ret], x[stdev]{
return(NA)
}else{
return(x[ret]/x[stdev])
}
}
names.df<-data.frame(rbind(S
1, MyFunc,
> ret=AVnames[i], stdev=SDnames[i]))
> }
>
>
> Help much appreciated.
>
> Regards,
> Sergey
>
>
> --
> Simplicity is the last step of art./Bruce Lee
> The more you know, the more you know you don't know. /Myself
>
> I'm not young e
t)%/%60)%%24
end.time<-paste(end.hours,end.mins,sep=":")
return(end.time)
}
addTime(c("15:23","7:00"),c(70,100))
or this:
addTime2<-function(timeTxt,mins){
orig.date<-as.POSIXct(paste("2001-01-01",timeTxt))
new.Date<-orig.date+mins*60
new.D
atomic vectors
>
> --
> Karl Ove Hufthammer
>
As a technical excercise, I wrote the following function:
'%W%'<-function(e1,e2)e1[,which(colnames(e1)%in%e2)]
temp<-matrix(1:6,nrow=2,dimnames=list(a=1:2,b=c("a","b","c")))
temp%W%"b&qu
it?
Alternatively, could some, very kind, person try and open the Splus
files, and save them in a R-readable format?
I would be extremely grateful for any help on this.
Best regards,
Gustaf Rydevik
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stoc
functions.
>
> Kind regards Knut
>
Just thought I'd show you a solution from the other direction, in
addition to those that all other have posted:
temp <- paste("m1","m2","m3",sep=",")##Generate string
nchar(gsub("([^,])",&
I can apply other statistical tests would be
> greatly appreciated.
>
> Thank you very much for taking the time to consider my questions.
>
> Adam
>
>
>
> [[alternative HTML version deleted]]
That's pretty much how I tend to do those things. what you seem to
On Thu, Dec 17, 2009 at 4:33 PM, Peng Yu wrote:
> On Thu, Dec 17, 2009 at 5:33 AM, Gustaf Rydevik
> wrote:
>> On Wed, Dec 16, 2009 at 10:13 PM, Peng Yu wrote:
>>>
>>> Currently, I load the RData file then ls() and str(). But loading the file
>>> takes t
On Wed, Dec 16, 2009 at 10:13 PM, Peng Yu wrote:
>
> Currently, I load the RData file then ls() and str(). But loading the file
> takes too long if the file is big. Most of the time, I only interested what
> the variables are in the the file and the attributes of the variables (like
> if it is a d
i,
x<-pi
substr(as.character(x),6,6)
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]]
__
R-help@r-project.org mailing list
h
\n")
> cat("-")
> cat("\n")
> sink()
>
write.table(matrix(rnorm(100),nrow=10),file="test.csv",append=TRUE,sep=",")
regards,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stock
he frame?
>
>
> Can you give an example of a couple of text files? Are they in a
standardised format (i.e. bibTEX or similar)?
/Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
Hi,
Just a quick note regarding google and R: I use www.rseek.org almost
exclusively, and it tends to give me the results I need. It is based on
google, but uses a number of smart tricks to ferret out R-relevant
information.
/Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
easy changing of
the output file type,
I've written this small function. Perhaps it can be of help.
Regards,
Gustaf
-
###Function by Gustaf Rydevik, 2009-12-03 gustaf.ryde...@gmail.com
## Created to facilitate easy changes in the file format of generated
graph
tps://stat.ethz.ch/mailman/listinfo/r-help
and send questions there instead of directly to me (who is not much of an R
expert...)
best regards, and good luck
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
e posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
[[alternative HTML version deleted]
atrix[3,3] <- 1/var(X[,3])
This code changes the weights implied by the inverse of the variances
by multiplying the first variable by a 1000 so that it is highly
weighted. In order to enforce exact matching see the exact and caliper
options. "
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
a
xlab = "treatment",
key = list(lines = Rows(trellis.par.get("superpose.line"),
c(1:7, 1)),
text = list(lab = as.character(unique(OrchardSprays$rowpos))),
columns = 4, title = &quo
On Wed, Apr 15, 2009 at 12:20 PM, Duncan Murdoch wrote:
> Gustaf Rydevik wrote:
>>
>> Hi all,
>> A colleague of mine tried to install the package EMV, which had been
>> removed from CRAN.
>> she ran into some kind of trouble, R locked up, and she closed the
>
7;ve copy-pasted the error message she gets when starting R.
Any ideas on what went wrong, and more importantly, how to fix it?
Many thanks in advance,
Gustaf Rydevik
Ps: She's running R on a WinXP box, if that might be of relevance...
Error : package 'utils&
Another, perhaps slightly more intuitive solution than Jim's would be
the following:
x<-data.frame(id=c(1,2,3), snp1=c("A","G",
"G"),snp2=c("G","G","G"),snp3=c("G","G","A"))
is.monovalued<-function(df){
to be productive again.
>
> Thank you all for your help,
>
> Best,
> MarC
>
Just a quick note on your original question:
if you use edit(arima), you have to remember that it returns the
modified function, which then must be stored.
I.e, use
arima<-edit(
On Wed, Feb 25, 2009 at 4:43 PM, Charles C. Berry wrote:
> On Wed, 25 Feb 2009, Gustaf Rydevik wrote:
>
>> On Wed, Feb 25, 2009 at 3:30 PM, hadley wickham
>> wrote:
>>>
>>> And for completeness here's a function that returns the next integer
>>&
gt; [1] 1
>> n()
> [1] 2
>> n()
> [1] 3
>> n()
> [1] 4
>> n()
> [1] 5
>> n()
> [1] 6
>
>
> ;)
>
> Hadley
>
*headache*!
I can't wrap my head around this one - too strange code!
Could someone please give a hint on what's going on?
2 2 1 2
> 639221 2 1 2
> 756221 2 1 2
>
> Thanks for any suggestions!
>
> -Aaron
>
You mean something like this:
> test<-matrix(sample(1:4,100,replace=T),ncol=10)
>
trix(rnorm(1000),ncol=100))
,and substitute another distribution for rnorm if you want.
/Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
__
R-help@r-project.org mailing list
https:/
et.1<-dataSet[dataSet$group==1,]
dataSet.0<-dataSet[dataSet$group==0,]
sampled.1<-dataSet.1[sample(1:nrow(dataSet.1),100),]
sampled.0<-dataSet.0[sample(1:nrow(dataSet.0),100),]
newdataSet<-rbind(sampled.1,sampled.0)
/Gustaf
(a "please", would have been nice.
unction - modify to suit your purpose
filterFunction<-function(n,data){
filteredData<-data[rowSums(data>=199)==1&(data[,n]>=199),,drop=FALSE]
if(nrow(filteredData)==0){
filteredData<-"NoMatchingRows"
}
return(filteredData)
}
names<-colnames(X)
lapply(as.list(
alculation you just enclose it
> in such tags that behave like an inverted block comment.
>
> Just a thought,
>
> baptiste
>
Isn't this almost exactly what ?Sweave does? (and odfWeave).
Granted, you have to deal with latex code to get nice output, but
latex is a GoodThing (t
gt;> What you think?
>
> Yes.
No.
Bernardo misplaced the parenthesis around (x-min(x))
Correct version is:
x <- rlnorm(1e6,meanlog=1,sdlog=1) ## pick any parameters you like
y <- round((x-min(x))/diff(range(x))*19+1)
/Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46
R, no?
Otherwise, I might be interested in porting R, taking it as an excuse
to learn objective C and C++
regards,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
__
R-help@r
tion(x)
seq(from=as.Date(x["start"]),
to=as.Date(x["stop"]),by=1
)
)
ActiveDays<-as.Date(unlist(activeDaysPerSession))
as.data.frame(table(ActiveDays))
Regards,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_ry
> Paulo Gustavo Grahl, CFA
>
[Note to Paulo:I changed the code slightly: defining Nonfunctions
separately messed things up.]
Hi Paulo,
The following should do it.
test<-function(x)x^2
test2<-5
test3<-77
ls()
rm(list=ls()[
sapply(ls(),
function(x){
class(get(x))!="
On Tue, Jan 20, 2009 at 4:08 PM, Gustaf Rydevik
wrote:
> Hi all,
>
> This is perhaps more a statistics question than an R question, but I
> hope it's OK anyhow.
>
> I have some data (see below) with the number of tests positive to
> subtype H1 of a virus, the number of t
ation regarding variance of H1/H3 in the two groups, so I don't
think it is correct.
I've tried using a bootstrap approach on the ratio of the two
proportions, but there must be a smarter way.
Any help is much appreciated!
Best regards,
Gustaf Rydevik
data and bootstrap attempt
t you expected, since ifelse recycles the second argument
if necessary.
Regards,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
__
R-help@r-project.org mailing list
https://stat
;Kalmar län", "Kronobergs län", "Norrbottens län", "Skåne län",
"Stockholms län", "Södermanlands län", "Uppsala län", "Värmlands län",
"Västerbottens län", "Västernorrlands län", "Västmanland
On Wed, Jan 14, 2009 at 3:07 PM, hadley wickham wrote:
> On Wed, Jan 14, 2009 at 5:51 AM, Gustaf Rydevik
> wrote:
>> Hi all,
>>
>> for some reason I always get stuck spending hours when trying to use
>> reshape or the Reshape package. Heaven knows why.
>>
not. The only information on why
is that "duplicate row names are not allowed".
It took me a fair time before figuring out that it was the "id"-column
that caused problems.
Perhaps something to fix, or at least give a more informative error message?
Best regards,
Gustaf
--
G
heavily in Sweden, have always been a major frustration.
Would it be possible to implement something similar to my solution in
base, and how should I go about making it fit in to the rest of the
date functions?
/Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40
date is in the beginning,middle or
end of the year
Wn<-ifelse(
Yn==Y-1,
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.S
spent a lot of time
> staring at it, and I'm still not sure where to start. Thanks!
>
>[[alternative HTML version deleted]]
>
Hi,
Nice little brain teaser! Not too difficult, but requires a bit of
creative thinking...
You might wanna have a look at, for example, ?d
>
> But I cannot get the stopping index after the first one.
>
> Tanks
> --
>
>[[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
>
ates<-seq(as.Date("01012005",format="%d%m%Y"),as.Date("31122005",format="%d%m%Y"),by=1)
TimeFrame<-data.frame(time)
TimeFrame$dates<-rep(dates,each=24)
Regards,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 S
On Wed, Oct 29, 2008 at 3:45 PM, Erik Iverson <[EMAIL PROTECTED]> wrote:
>
>
> Leon Yee wrote:
>>
>> Gustaf Rydevik wrote:
>>> Hi Leon,
>>>
>>> unique(x)
>>>
>>> or
>>>
>>> duplicated(x)
>>>
>>
an I filter out
> all the elements which occured >=2 times?
>
>Thanks for any help!
>
> Regards,
> Leon
>
Hi Leon,
unique(x)
or
duplicated(x)
should work, depending on what you want.
Best,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetor
units. Same goes for cex.
Many thanks 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:Ess
t;- 12, NA))))
>
> Suggestions?
How about the following?
x<-c(1,0,0,1,0,0,1,0,0,1)
y<-c(1,3,2,3,2,1,2,3,2,3)
z<-c(1,2,1,2,1,2,1,2,1,2)
d<-as.data.frame(cbind(x,y,z))
xyz.comb<-interaction(x,y,z,lex.order=T)
d$myvar<-match(xyz.comb,levels(xyz.comb))
/Gustaf
Gust
eader=T) ## If you have headers
2)
read.table("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
296"
V1 V2 V3 V4V5 V6 V7
1 AB002296 panTro2 chr6 - 162615884 162626270 Chimpanzee
>
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
__
R-h
give us a small sample of the "source" data, so that your
example is reproducible?
>From looking at your code, it seems as if you copied something wrong.
First you write:
grep("XM_528056", source$V1)
,but when you print dat2 it seems as if your ID-code ("XM_528056&quo
.data.frame, for which you can have a look at the code. An added
complication is that these functions are calling C-code by using
".Internal". This C-code can be found in cran, but as I don't know C,
I've never tried it out more than having a quick l
hs of running a
computer.
Perhaps an alternative approach would be to get access to stronger
(super)computers, either at a university, or buying access. A quick
googling turns up http://www.clusterondemand.com/ for example.
Anyhow, good luck with your project! I'm sure the R
unsure if
you would be able to follow.
In the end, it doesn't really matter. What you are doing amounts to
doing a regression 50 times, when once would suffice. No big harm
done, just a bit of unnecessary work. And proof to a statistically
competent reviewer that you don't really unde
e required? Any other ways of
> doing this?
>
>
>
> Thanks, Shubha
>
>
How about
x<-1:80
filter(x,rep(1,8),"convolution",sides=1)[seq(8,length(x),by=8)]
##or
cumsum(x)[seq(8,length(x),by=8)]
?
/Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essi
lection
process*, Step1-4 in the methods section, and find that their approach
gives better result
What you are doing is only step4 in the article's method
section,estimating the parameters of a model *when you already know
which variables to include*.It is the way this step is conducted that
and
taking median most likely is no better than standard regression.
best regards,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
__
R-help@r-project.org mailing list
https:/
gt;>
>> OK,
>>
>> Let x=c(4,2,2)
>> y=c(1,5,3)
>>
>> My result should be c(4,1,2,5,2,3)
>>
>> Thanks, Shubha
>>
There should be nicer ways, but this does it:
x<-c(4,2,2)
y<-c(1,5,3)
c(matrix(c(x,y),byrow=T,nrow
df$num1)
I've never tried using any of the prepackaged bootstrap functions
since it's so easy to write your own. And I never really figured out
why you wanted to split the data in two, unless you do it before
bootstrapping to have a test set.
Regar
a fraction?
- If this is measured on test persons, I assume that you used each
person several times. Is that so?
Answers to the above questions might be good to bring to your meeting
with the statistics faculty.
Good luck with your research,
Gustaf
--
Gustaf Rydevik, M.Sci.
te
value=rnorm(200))
by(myD$value,myD$code,mean)
but that won't get you the the group means in the empty column without
some more lines of code. Another way is to use ?lapply and ?unlist:
myD$Pr_mean<-unlist(lapply(as.character(myD$code),function(x)
mean(myD$value[myD$code==x])
=FALSE, col.names=FALSE, file=output, quote=FALSE)
write.table(data.frame(RowNames=row.names(x[[i]]),x[[i]]),
file=output, quote=FALSE,row.names=FALSE) ##excluding actual
rownames, adding them as a column.
}
close(output)
-
It seems as if you can't get it to write "row.names",
TED]> wrote:
> On Wed, 25 Jun 2008, Peng Jiang wrote:
>
>> Hi , Gustaf
>> i don't know why but it works pretty well on a mac.
>
> with completely different code.
>
> Gustaf Rydevik has mentioned this before -- it never fails for me on Windows
> and hence one wo
On Wed, Jun 25, 2008 at 10:16 AM, Uwe Ligges
<[EMAIL PROTECTED]> wrote:
>
>
> Gustaf Rydevik wrote:
>>
>> Hi all,
>>
>> A while back I sent a message concerning working with tiff-files, and
>> mentioned that I encountered a bug in 2.7.0.
>> This
"R GUI has encountered a problem and
needs to close".
Can anyone else out there reproduce this, so I can file a bug report?
Best,
Gustaf Rydevik
---
> sessionInfo()
R version 2.7.1 (2008-06-23)
i386-pc-mingw32
locale:
LC_COLLATE=Swedis
dear Xu,
does:
>library(urca)
>example(ur.ers)
>ers.gnp
>str(ers.gnp)
>[EMAIL PROTECTED]
,do what you want?
(this reminds me that I have to learn S4 sometime)
best,
Gustaf Rydevik
On Tue, Jun 24, 2008 at 3:52 AM, Xu, Ke-Li <[EMAIL PROTECTED]> wrote:
> Dear Sir/Madam
& a$g
[1] FALSE FALSE FALSE TRUE
> a$r && a$g
[1] FALSE
ifelse takes a vector as argument. isince && only gives a single
value, ifelse(r>0 && g> 0,log(r/g),NA) will only return NA, which
then is recycled by transform. When using &, ifelse returns a vector,
On Fri, May 23, 2008 at 4:40 PM, Gustaf Rydevik
<[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm currently preparing some figures that will be submitted to PloS One.
> In their guidelines they state that they will only accept figures in
> tiff or eps format, with the warnin
t text becomes
low-res bitmaps, and I don't 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
addres
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
sk
t does not work:
>
> for (ind in 1:10) {
>
> Yind = L0 + L1*X1 + L2*X2 + L3*X3 + K*Cind + n
>
>
> }
>
> Any suggestions?
>
> Thank you.
>
>
look up ?assign and ?get, i.e:
for (ind in 1:10) {
assign(paste("Y",ind,sep=""),L0 + L1*
ke
a look at demo(plotmath).
I really don't think you have to go outside of R to do what you want.
In addition, if you aim to end up with a latex report I strongly
encourage you to try out ?Sweave. It has certainly helped to
streamline my workflow.
Regards,
Gustaf
-
f those tasks that is needed fairly frequently,
but which is rarely bothered with. Would it be possible to add one of
these algorithms as an option to the regular text()?
Regards,
Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_
)
text(x,y,x.labels)
###Most of the time some of the labels end up unreadable.
---
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
__
R-help@r-project.org m
On Feb 13, 2008 3:06 PM, Gustaf Rydevik <[EMAIL PROTECTED]> wrote:
> On Feb 13, 2008 2:37 PM, Matthias Gondan <[EMAIL PROTECTED]> wrote:
> > Hi Eleni,
> >
> > The problem of this approach is easily explained: Under the Null
> > hypothesis, the P value
are the "true" predictors, and the rest being false
positives. this set of 20 genes can then be further analysed. A much
smaller and easier problem to solve, no?
/Gustaf
--
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik
__
1 - 100 of 124 matches
Mail list logo