similar to: Manipulating matrices

Displaying 20 results from an estimated 5000 matches similar to: "Manipulating matrices"

2007 Feb 15
3
Working with temporal data
Hi, I have several files with data in this format: 20070102 20070102 20070106 20070201 ... The data is sorted and each line represents a date (YYYYMMDD). I would like to analyze this data using R. For instance, I would like to have a histogram by year, month or day. I've already made a simple Perl script that aggregates this data but I believe that R can be much more powerful and easy on
2007 Jun 20
2
Averaging dates?
Hi, What's the best way to average dates? I though mean.POISXct would work fine but... > a [1] "2007-04-02 19:22:00 WEST" > b [1] "2007-03-17 16:23:00 WET" > class(a) [1] "POSIXt" "POSIXct" > class(b) [1] "POSIXt" "POSIXct" > mean(a,b) [1] "2007-04-02 19:22:00 WEST" > mean(b,a) [1] "2007-03-17
2007 Feb 23
2
Google Custom Search Engine for R
Hi, Since "R" is a (very) generic name, I've been having some trouble searching the web for this topic. Due to this, I've just created a Google Custom Search Engine that includes several of the most relevant sites that have information on R. See it in action at: http://google.com/coop/cse?cx=018133866098353049407%3Aozv9awtetwy This is really a preliminary test. Feel free to
2007 Mar 02
2
Error in length of vector ?
Hi, I'm having a weird result with the length() function: >a [... omited ...] [9994] NA "2003-12-03 16:37:00" "2002-06-26 18:43:00" [9997] "2005-07-04 04:00:00" "2007-02-16 22:09:00" "2007-02-24 15:49:00" [10000] NA > length(LastModified) [1] 9 > length(c(LastModified)) [1] 9 I was expecting to get
2008 Jun 17
2
Measuring dispersion
Hi, I'm looking for a function to measure the dispersion of a set of values ranging from 0 to 1. This function should be 0 if all the values are evenly spaced within the interval and it should be > 0 if values are clustered. The more clustered the values are, the higher should the function be. An example: [0; 0.2; 0.4; 0.6; 0.8; 1] - function should be ~ 0 [0; 0.1; 0.1; 0.15; 1] -
2007 Mar 07
2
No years() function?
Hi, I'm trying to aggregate date values using the aggregate function. For example: aggregate(data,by=list(weekdays(LM),months(LM)),FUN=length) I would also like to aggregate by year but there seems to be no years() function. Should there be one? Is there any alternative choice? Also, a hours() function would be great. Any tip on this? Thanks in advance! S?rgio Nunes
2007 Feb 16
1
Working with temporal data [Solved]
Just for the record, here are my steps for producing a date based histogram. Data is stored in a file where each line only has a date - 2007/02/16 >d<-readLines("filename.dat") >d<-as.Date(d, format="%Y/%m/%d") >pdf(yearly.pdf) >hist(d, "years") >dev.off() Instead of "years" you can also use "days", "weeks",
2005 Dec 13
4
Ploting graphics using X tints from a color
Hi, I'm trying to draw a 2D plot using multiple tints of red. The (simplified) setup is the following: || year | x | y || My idea is that each year is plotted with a different tint of red. Older year (lightest) -> Later year (darkest). I've managed to plot this with different scales of grays simply by doing: palette(gray(length(years):0/length(years))) before the plot and for each
2009 Jun 01
1
Bug in hist() when working with Dates ?
Hi, It seems that hist() has a buggy behavior when breaking over "days". The bug can be reproduced in a few steps: > d=data.frame(date=c("2009-01-01", "2009-01-02", "2009-01-02")) > d$date=as.Date(d$date) > d$date [1] "2009-01-01" "2009-01-02" "2009-01-02" > h=hist(d$date, "days") > h$count [1] 3
2011 Sep 12
2
Automated generation of combinations
Hello,   I'd like to generate automatically all the possible combinations of a set of 8 variables (there are 535, too many to do it by hand). For example:   input: varA, varB, varC output: varA+varB+varC             varA+varB             varA+varC             varB+varC             varA             varB             varC Is there any function that produces this option?   Thank you [[alternative
2005 Sep 28
1
Change console language ?
Hi, I'm pretty new to R, I've just installed version 2.1.1 on Windows. I have a simple (it seems) doubt - how do I change the Console default Language ? It's set to Portuguese but I would like to view it in English. Thanks in advance, S??rgio Nunes
2008 Mar 16
2
How to loop through all the columns in dataframe
Hi: Can anyone advice me on how to loop and perform a calculation through all the columns. here's my data xd<- c(2.2024,2.4216,1.4672,1.4817,1.4957,1.4431,1.5676) pd<- c(0.017046,0.018504,0.012157,0.012253,0.012348,0.011997,0.012825) td<- c(160524,163565,143973,111956,89677,95269,81558) mydf<-data.frame(xd,pd,td) trans<-t(mydf) trans I have these values that I need to
2011 Aug 03
1
Coefficient names when using lm() with contrasts
Dear R Users, Am using lm() with contrasts as below. If I skip the contrasts() statement, I get the coefficient names to be > names(results$coef) [1] "(Intercept)" "VarAcat" "VarArat" "VarB" which are much more meaningful than ones based on integers. Can anyone tell me how to get R to keep the coefficient names based on the factor levels
2007 Dec 07
5
Grouping by interval
Hello, I have a dataframe of say 20 lines with one line per individual. I want to group these 20 individuals by length class (eg. of 5cm) and get the mean value of all the other variables (eg VarA and VarB) for each length class My dataframe is as follow: Length <- 10:30 VarA <- seq(1000,1200,10) VarB <- seq(500,700,10) Data <- cbind(Length,VarA,VarB) And I want to get something
2018 Apr 28
2
mp3 stream and Chrome v.65.0.33.25.181
Hi there, I have used VLC 0.9.9 on Windows platform for streaming audio to icecast2 for years. Had no problems. Since Google Chrome v.65.0.33.25.181 I ran into problems. Stream will play couple of minutes and then stop. Is there something fundamentally wrong with my configuration in vlm configuration: output
2007 Nov 07
2
creating a dynamic output vector
Let's say I have a program that returns variables whose names may be any string within the vector NAMES=c("varA","varB","varC","varD","varE","varF"..."varZ"), but I do not ever know which ones have actually been created. So in one example output, "varA", "varC", and "varD" could exist, but
2012 Jan 01
1
How to pass in a list of variables as an argument to a function?
Hello, I have some code that currently works fine and I am endeavoring to convert the major pieces of it into functions. This involves taking "hard coded" names of variables that are used in various places and figuring out how to abstract them out into functions where the arguments (i.e. a list of variables)?can be passed to the parent function and used within that function for various
2004 Nov 01
1
plot time series / dates (basic)
Dear R users, I'm having a hard time with some very simple things. I have a time series where the dates are in the format 7-Oct-04. I imported the file with read.csv so the date column is a factor. The series is rather long and I want to plot it piece by piece. The function below works fine, except that the labels for date are meaningless (ie 9.47e+08 or 1098000000 - apparently the number of
2018 Apr 28
1
mp3 stream and Chrome v.65.0.33.25.181
Hi there, mux=raw made the change. Thanks! Moimoi, Oskar Vilkevuori > On 28 Apr 2018, at 23.07, Marvin Scholz <epirat07 at gmail.com> wrote: > > > > On 28 Apr 2018, at 21:46, Oskar Vilkevuori wrote: > >> Hi there, >> >> I have used VLC 0.9.9 on Windows platform for streaming audio to icecast2 for years. Had no problems. Since Google Chrome
2004 Dec 21
3
R code for var-cov matrix given variances and correlations
Dear list members, Where can I find code for computing the p*p variance-covariance matrix given a vector of p variances (ordered varA, varB, ..., varp) and a vector of all possible correlations (ordered corAB, corAC, ..., corp-1,p)? I know that the covariance between 2 variables is equal to the product of their correlation and their standard deviations: corAB * varA^.5 * varB^.5 and so: