search for: myyear

Displaying 4 results from an estimated 4 matches for "myyear".

2009 Oct 06
2
Extracting year from a date object
...dvance. I have a list of dates in numerical format (i.e. 34576), defined as the number of days that passed since january 1st 1900. So I apply the function : > MyDate <-as.Date(34576,origin="1900-01-01") > MyDate [1] "1994-09-01" But then I want to do something like : MyYear <- a.year.function(MyDate) MyYear should have the numerical value 1994. Alas, I don't find any function like that. I know I can take a substring of MyDate and convert to numeric, or even use the function "seq()" : > length ( seq ( as.Date("1900-01-01"), MyDate, &quot...
2005 Jun 10
1
Problems with corARMA
Dear all I am tryiing to fit the following lme with an ARMA correlation structure: test <- lme(fixed=fev1f~year, random=~1|id2, data=pheno2, correlation=corARMA(value=0.2, form=~year|id2), na.action=na.omit) But I get the following error message: Error in getGroupsFormula.default(correlation, asList = TRUE) : "Form" argument must be a formula I have used this same form
2011 Dec 07
1
Help! I couldn't put multiple qplot on the same page...
...orrect location for (i in 1:numPlots) { curRow = ceiling(i/plotCols) curCol = (i-1) %% plotCols + 1 print(plots[[i]], vp = vplayout(curRow, curCol )) } } My code is as below: ---------------------------- myplotlist=vector('list', 6) nCount=0; for (j in myyears) { print(j) nCount=nCount+1 #... # prepare datasub and factorsub for different j... #... tmp<-data.frame(as.double(datasub),as.numeric(factorsub)) tt=qplot(factor(as.numeric(factorsub)),as.double(datasub),data=tmp,geom = "bo...
2008 Nov 04
2
Problem: Sweave and math environments
...have an unequal number of $ signs in an input line, so that LaTex thinks that all of the following "normal" text is still part of the math environment, and formats it accordingly. This is an example input line: Pre_Year <- MyMain3$Con_Stat[MyMain3$MyID==ID_Count[i] & MyMain3$MyYear==Count_Years[y-1]] where I have three $ sings, and LaTex thinks that everything following the last $ sign is still part of a formula. I have two question now: 1. Is there any way to solve the problem within Sweave itself, e.g. through setting options? 2. If not: is there a way to generally turn...