similar to: How to assign week numbers to a time-series

Displaying 20 results from an estimated 7000 matches similar to: "How to assign week numbers to a time-series"

2011 Feb 04
1
read.table error
R experts, I am working with a fairly large data set comprised of 563 rows by 116 columns including several different modes. I have been unable to read in the data set completely using the read.table function and the RGui (i.e. nearly half the total number of rows are missing from the data set along with the column names). The data does read in fully using Tinn-R's Rterm; however, at several
2011 Feb 10
1
Conditional sampling
R experts, I need to sample two rows without replacement from the following data frame such that neither row contains the same 'DOW'. For example, I cannot select both a Monday morning and a Monday afternoon. I am using STRATA_NUM as an index to randomly select rows from, since this variable indexes all unique permutations of DOW, SITE, and TOD. I know how to use the sample function
2011 Jun 14
0
sqlFetch and factor conversion
R users, Hello, I used sqlFetch to import a data table from MS Access 2007 and I set as.is = TRUE to prevent character vectors from becoming factors. However, I can't figure out how to prevent the $ operator from being added by sqlFetch to the end of each character vector(e.g. TD$ and SITE$). This causes subsequent parts of my code not to work and also results in some behavior that I
2010 Mar 25
4
Creating dataframe of all possible variable combinations
Hello, I need to create a dataframe containing all possible combinations of three variables: SITE (101,102,103,104), WDAY (MON,TUE,WED,THR,FRI), and TOD (MORN, AFTN). There should be a total of 40 unique combinations in my dataframe. I used expand.grid() successfully(?) to create my dataframe, but then when I went to order it by SITE, the resultant dataframe only contained four rows, one for each
2011 Feb 17
0
Data frame sampling
R users, I have been trying to write a program in R that will extract rows from a data frame and combine the rows into a new smaller data frame while meeting several criteria. I would greatly appreciate any advice that could help me get started down the right path. What I want to do is to extract two rows WEEK (26 weeks total) from the data frame by sampling without replacement from the
2010 Apr 20
5
Assigning Week Numbers
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 the following day numbering format (Sat=1,Sun=2,Mon=3.....Fri=7). This means that new weeks must begin on Saturdays, and end on Fridays (except for the first date
2012 Nov 12
5
Matrix to data frame conversion
I have a matrix which I wanted to convert to a data frame. As I could not succeed and resorted to export to csv and reimport it again. Why did I fail in the attempt and how can I achieve what I wanted without this roundabouts? The original matrix: > str(comb_model0) num [1:90, 1:4] 3.5938 0.0274 0.0342 0.0135 0.0207 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:90]
2010 Jul 20
1
ifelse() and missing values in test conditions
R experts, I have been unable to get the following ifelse statement to work as desired when applied to my data frame. Example: DF$ANYEF <- with(DF,ifelse(PSOUGHT1=='ANY'|PSOUGHT2=='ANY'|PSOUGHT3=='ANY',PEFF,0)) ##### this statement will be replicated 16 times for 16 unique _EF variables ### Basically, I want each ANYEF for each row to equal the corresponding row
2010 Feb 26
7
How to add a variable to a dataframe whose values are conditional upon the values of an existing variable
Hi everyone, I am at my wits end with what I believe would be considered simple by a more experienced R user. I want to know how to add a variable to a dataframe whose values?are conditional?on the values of an existing?variable.?I can't seem to make an ifelse statement work?for my situation.?The existing variable?in my dataframe is?a character variable named DOW which contains abbreviated
2005 Jan 25
2
Having problems running palm desktop or the uninstall program
I have a user John Dow on a local machine johnsmachine. I have a samba user jdow. When I moved the profile john dow to the domain keydomain, I can't get the install program to run. This is how it looks. I have local profile johnsmachine/John Dow and roaming profile keydomain/jdow. When logged into profile johnsmachine/John Dow, I can install and uninstall the palm software with no
2010 Aug 13
1
assign multiple variables at once
R Experts, I would like to create a series of variables without having to assign a separate line of code for each new variable. My dataframe (DF) contains two groups of linked variables (ESP1:ESP9) and (ECRL1:ECRL9). Within ESP1:ESP9 are abbreviated species codes (full dataframe contains 26 codes). ECRL1 represents the number of species x in variable ESP1 harvested, and so on through ESP9 and
2006 Jun 15
3
Can I call MySql statements directly??
Hi All. I have a mysql statement that I would really really like to call from my Ruby program which goes like this: SELECT a, b, DAYOFWEEK(date_time) as DOW, HOUR(date_time) at hr, AVG(x/y) FROM records; This is possible by creating a 3-dimentional array of a, b, date_time containing x/y, and then finding averages and putting it into a 4-dimensional array of a, b, dow,
2011 Mar 09
2
Complex sampling?
R users, I am trying to generate a randomized weekday survey schedule that ensures even coverage of weekdays in the sample, where the distribution of variable DOW is random with respect to WEEK. To accomplish this I need to randomly sample without replacement two weekdays per week for each of 27 weeks (only 5 are shown). However, I need to sample from a sequence (3:7) that needs to be
2006 Jan 05
1
sortable_element not recognizing newly added <li> elements
I have a user defined list of items. Using the sortable_element function, I can manipulate the ordering of this list fine by dragging each component around. When I dynamically add another <li> item to this list, the newly added item is _not_ "draggable" like its other siblings. Using the sortable_element function, how do I make it aware of newly added list items? Here is my
2012 Feb 17
1
R's list data structure
Given dayOfWeekName<-c("Mon","Tue","Wed","Thu","Fri","Sat","Sun"); dayOfWeekOrdinal<-c(1,2,3,4,5,6,0); dayOfWeekWorkDay<-c(TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,FALSE); weekProfile<-list(dow=dayOfWeekName,dowI=dayOfWeekOrdinal,dowW=dayOfWeekWorkDay) 1. How can I conditionally get dow, dowI, and dowW from weekProfile?
2011 Sep 08
1
Seasonal and 11-day subset for zoo object
I have a zooreg object and I want to be able to generate a value for seasons and 11-day composites paste it onto my zoo data frame, along with year, month and days. Right now I have the following to work from: eg. dat.zoo.mdy <- with(month.day.year(time(dat.zoo)), cbind(dat.zoo, year, month, day, quarter = (month - 1) %/% 3 + 1, dow = as.numeric(format(time(dat.zoo), "%w")))) For
2006 Nov 03
3
Nortel Option 11C and SIP gateway integration
Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 186 bytes Desc: OpenPGP digital signature Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20061103/b35592e2/signature.pgp
2010 Jan 22
2
Question on Merge/Lookup
I need to merge three datasets and don't know how. If I were using SQL, I would use df3, look up the characteristics of each date in df1 and the value for each observation in df2. df1 - unique list of Dates and characteristics of those dates Date, YYYYMM, YYYYWW, DOW df2 - the raw data Date, Place, Value df3 - all posibile combinations of Date + Place (via
2007 Oct 14
2
GetTimeZoneInformation question
Hi all, The following code snippet isn''t working terribly well for me. I can get the Bias, StandardName and DaylightName, but everything else is goofed up. The alignment seems ok, but maybe I''ve missed something or maybe I have to do extra work to unpack the SYSTEMTIME structures. require ''windows/time'' include Windows::Time buf = 0.chr * 172 #
2008 Jul 24
3
DoW Soulstorm crack
I was wondering if anyone has been able to get DoW Soulstorm Running on their Wine. I've looked at several forum lines, and no one seems to have been able to crack it yet. From what i've gathered, the reason it wont work is because of the cd check. If i were able to crack the game so it didnt check for the cd, would it work then? I'm very new to Linux, so please post any replies with a