similar to: How to monthly,daily,yearly average

Displaying 20 results from an estimated 2000 matches similar to: "How to monthly,daily,yearly average"

2009 Nov 06
2
how can I delete those columes with the same element in every row?
e.g. a= a b c d e 1 1 1 3 1 1 2 1 2 3 4 5 3 1 3 3 8 3 4 1 4 3 3 5 5 1 1 3 1 1 I want to delete colume a and colume c, because they have the same values in every row, then ,I want to get this data.frame . b= b d e 1 1 1 1 2 2 4 5 3 3 8 3 4 4 3 5 5 1 1 1 the following is my code but it's wrong. rm(list=ls()) a=c(1,1,1,1,1); b=c(1,2,3,4,1); c=c(3,3,3,3,3);
2009 Dec 20
2
how to create three new variables? Thanks a lot!
Dear R experts: I have following data structure: student id, exam time and score. I want to create three new columes: 1 st before, 2nd before and 3rd before. For example, for student 1's 4th exam score is assumed to be influenced by his previous three cloest scores, which are 6, 9, and 10 in that order. For student 2's 5th exam score is assumed to be inflenced by her previous cloest
2012 Feb 15
2
Plotting monthly maps from yearly data
I have some data set which is available from 2005-2010 . I would like plot monthly maps out of it. So how I should write loop that can plot this yearly data to for every month and write title for individual months too. -- View this message in context: http://r.789695.n4.nabble.com/Plotting-monthly-maps-from-yearly-data-tp4391704p4391704.html Sent from the R help mailing list archive at
2010 Dec 26
2
What is the best way to lag a time series?
Dear R-users, I've been using R for a while and I am very satisfied! Unfortunately, I still have not figured out an efficient and general way to construct and use lags of time series, especially when I need to work with different packages. Let me give an example. I have two time series x and y and I want to estimate a variaty of distributed lags models and run different tests
2009 Nov 06
2
another question: how to delete one of columes in two ones with high correlation(0.95)
my programe is below: a=c(1,2,1,1,1); b=c(1,2,3,4,1); c=c(3,4,3,3,3); d=c(1,2,3,5,1); e=c(1,5,3,5,1) data.f=data.frame(a,b,c,d,e) origin.data<-data.f cor.matrix<-cor(origin.data) origin.cor<-cor.matrix m<-0 for(i in 1:(cor.matrix[1]-1)) { for(j in (i+1):(cor.matrix[2])) { if (cor.matrix[i,j]>=0.95) { data.f<-data.f[,-i]; i<-i+1 }
2013 Jan 17
2
How to calculate monthly average from daily files in R?
I have 365 binary files: https://echange-fichiers.inra.fr/get?k=oy3CN1yV1Um7ouRWm2U ,I want to calculate the monthly average. So from the 365 files, I will get 12 files.I would like also to tell R not to take into account the no-data value (-32765).for example, for the first month, there are 31 records: 3 of these records has the value -32765,I want R to take the average of the rest records(28
2009 May 04
1
how to remove ( ) ? when using write.csv(chron.object)
Hello all, I don' like to have ( ) around my datetime, when send the csv file to somebody. How to remove it? >library(chron) >mydate <- c("2009-05-03","2009-06-07") >mytime <- c("10:30:00","10:20:00") >mydatetime <- chron(dates=mydate,times=mytime,format=c("y-m-d","h:m:s")) >write.csv(mydatetime)  
2009 Mar 30
1
how to input multiple .txt files
how to input multiple .txt files? A data folder has lots of .txt files from different customers. Want to read all these .txt files to different master files: such as: cust1.xx.txt, cust1.xxx.txt, cust1.xxxx.txt,.............. to master file: X.txt cust2.xx.txt, cust2.xxx.txt, cust2.xxxx.txt,.............. to master file: Y.txt Thanks! [[alternative HTML version deleted]]
2009 May 01
1
How to use write.csv(x=zoo.object), and how to let the first column corret?
Use  write.csv to output a zoo object, and found the first column in excel like:  (08-10-16 13:12:00)   How to make it look like : 10/16/2008 13:12:00 ?     write.csv(x=zoo.object)   Thanks! [[alternative HTML version deleted]]
2008 Oct 01
0
plotting several yearly/monthly time series on the same plotting several yearly/monthly time series on the same graph
I have searched the forums but I am having trouble trying accomplish two specific plots. I am not sure if this is a very basic task but I am having a lot of trouble Here is my data frame: date prod_daily price 1 2003-08-15 12050 4.83 2 2003-08-18 12050 4.94 3 2004-08-10 12300 5.78 4 2004-08-11 12300 5.64 5 2004-08-12 12300
2005 Jul 01
2
Automating message archiving
Hallo, I recently stumple over some discussion about Sieve and what's the advantage to integrate it into the server rather than the LDA. Most of the filtering capabilites local users want to have performed are related to the INBOX or more preciesly the way to filter the message coming in. However, there are few tasks left: 1) Auto-archive old mail. 2) Drop old mail. 3) "Seen"
2004 Jul 06
3
Improving effeciency - better table()?
Hi, I've been running some simulations for a while and the performance of R has been great. However, I've recently changed the code to perform a sort of chi-square goodness-of-fit test. To get the observed values for each cell I've been using table() - specifically I've been using cut2 from Hmisc to divide up the range into a specified number of cells and then using
2010 May 26
4
More efficient way to use ifelse()?
# This is more about trying to find a more effecient way to code some simple vectorized computations using ifelse(). # Say you have some vector representing a factor with a number of levels (6 in this case), representing the location that samples were collected. Population <- gl( n=6, k=5,length=120, labels =c("CO", "CN","Ga","KO", "Mw",
2012 Oct 19
1
to.yearly()
v="IBM" library(quantmod) v v1=getSymbols(v) to.yearly(v1) =============================== when i pass the value through a variable in to.yearly() function it shows the error msg like "Error in try.xts(x) : Error in UseMethod("as.xts") : no applicable method for 'as.xts' applied to an object of class "character"" i need the result of OHLC
2009 Mar 27
4
A beginner's question
I am a new R-language user. I have set up a data frame "mydata",one of the colume of which is "skill". Now I want to select the observations whose "skill" value is equal to 1,by what command can I get it?
2009 Jul 26
2
zoo plot: yearly marks on X-Axis
Hi all, I am plotting a financial time series, but I need a more detailed X-Axis. Example: x <- zoo(rnorm(1:6000), as.Date("1992-11-11")+c(1:6000)) plot(x) The X-Axis is labeled "1995", "2000" and "2005". I would need either "1995", "1997", etc. or maybe yearly I used google first, then look at "?plot.zoo" but
2012 Aug 15
4
Import Data from Excel
Dear all, I want to import just part of an excel data file into R. I would like to have the data imported without rownames or colume names. I used read.delim("clipboard", header=F). Somehow even though I added the argument "header=F", I still have the row names V1, V2, ..., Does anyone know how to fix this? Thanks very much in advance. Hannah [[alternative
2004 Aug 03
4
How to select a whole column? Thanks!
Dear all, I hope to remove a whole column from a data frame or matrix (> 2000 columns). All value in the column are same. The first thing is to select those columns. For instance, I hope to remove the V3~6 column, for all the value in those colume is zero. V3 V4 V5 V6 V7 V8 V9 V10 1 0 0 0 0 0.000 0.000 0.000 0.000 2 0 0 0 0 0.000 0.000 0.000 0.000 3 0 0 0
2010 Jan 01
1
Chainging monthly data to daily data
Hi, I have a zoo object with monthly frequency : library(zoo) dat <- zooreg(rnorm(50), as.yearmon("2000-01-01"), frequency=12) Now I want to make a zoo object with daily frequency from "dat" wherein value for a each day for a particular month will be value of "dat" at that particular month. Is there any easy way to do that? Thanks, -- View this message in
2012 Apr 23
2
subset daily to monthly in a zoo or xts
Dear R users, I want to subset a daily zoo series according to its month, find % of "NA" in each month. I am finding it difficult to subset the daily dataset into monthly for the given operation.I am planning to do this for a huge dataset. Thanks in advance. Regards Vikram [[alternative HTML version deleted]]