Re: [R] weighted least squares vs linear regression

2010-01-28 Thread DispersionMap

sorry, i ommited some important information.

this is a documentation question!

i meant to ask how to find out how R calculates the standard error and how
it differs between the two models 
-- 
View this message in context: 
http://n4.nabble.com/weighted-least-squares-vs-linear-regression-tp1387957p1393060.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


[R] weighted least squares vs linear regression

2010-01-28 Thread DispersionMap


I need to find out the difference between the way R calculates weighted
regression and standard regression.


I want to plot a 95% confidence interval around an estimte i got from least
squares regression.

I cant find he documentation for this

ive looked in 
?stats
?lm
?predict.lm
?weights
?residuals.lm

Can anyone shed light?

thanks

Chris.  
-- 
View this message in context: 
http://n4.nabble.com/weighted-least-squares-vs-linear-regression-tp1387957p1387957.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


Re: [R] testing the fit of a regression and comparing regressn models

2010-01-22 Thread DispersionMap

anyone?
-- 
View this message in context: 
http://n4.nabble.com/testing-the-fit-of-a-regression-and-comparing-regressn-models-tp1055033p1101383.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


[R] Logistic regression

2010-01-21 Thread DispersionMap

can you do Logistic regression in R, if so how do you do it and how do you
test the fit of a model?
-- 
View this message in context: 
http://n4.nabble.com/Logistic-regression-tp1059870p1059870.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


[R] testing the fit of a regression and comparing regressn models

2010-01-21 Thread DispersionMap



I got the usual regression output from a model i did in R.

Im looking for alternative test criteria that can be done in R which are not
in the standard lm output.

I need to:

a) asses the fit of a logistic regression model and of a linear regression
model

b) compare the fit of models against each other

c) Does r do things like...
Spearman’s rank
Cooks distance
Deviance
BIC
Elbow/Scree plot

-- 
View this message in context: 
http://n4.nabble.com/testing-the-fit-of-a-regression-and-comparing-regressn-models-tp1055033p1055033.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


Re: [R] forecasting

2009-12-20 Thread DispersionMap

Very good patrick, lol.


does anyone have any useful ideas


Patrick Burns wrote:
> 
> DispersionMap wrote:
>> 
>> What about validating forecasting results. I have 5 years of data and
>> have
>> been forecasting the following three years i.e. 2010 to 2012.
>> 
>> How can i check my forecast.
>> 
>> Why types of tests are out there that can be implemented in R??
> 
> isbn 9780553213515
> 
> Sorry, couldn't resist,
> 
> Pat
> 
> __
> R-help@r-project.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.
> 
> 

-- 
View this message in context: 
http://n4.nabble.com/forecasting-tp974326p975920.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


Re: [R] forecasting

2009-12-18 Thread DispersionMap


What about validating forecasting results. I have 5 years of data and have
been forecasting the following three years i.e. 2010 to 2012.

How can i check my forecast.

Why types of tests are out there that can be implemented in R??
-- 
View this message in context: 
http://n4.nabble.com/forecasting-tp974326p975010.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


Re: [R] forecasting

2009-12-18 Thread DispersionMap


Hi thanks.

Another question...

When R prints the regression output onto the screen after i perform my
regression:

output_dat <- lm(
results <- summary(output_dat)
results 

How do i print the regression output to a file for inclusion into a
document.

I tried:  cat(summary(output_dat), file="results.txt"))

but this doesnt work and it tells me type list (in the first argument)
cannot be handled by cat.


So how do i get the output of lm to the desktopas i need to put this in
a document (in atble would be even better).
 


Stephan Kolassa wrote:
> 
> ?predict
> 
> HTH
> Stephan
> 
> DispersionMap schrieb:
>> 
>> I have some data that i ran a regression on and got the usual r output,
>> with
>> the a intercept and b coefficient for my independent variable.
>> 
>> i want to forecast the number of future events using these parameters.
>> 
>> 
>> What function / packages in R would you recommend to be used in good
>> effect
>> for these purposes??
> 
> __
> R-help@r-project.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.
> 
> 

-- 
View this message in context: 
http://n4.nabble.com/forecasting-tp974326p974704.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


[R] forecasting

2009-12-17 Thread DispersionMap


I have some data that i ran a regression on and got the usual r output, with
the a intercept and b coefficient for my independent variable.

i want to forecast the number of future events using these parameters.


What function / packages in R would you recommend to be used in good effect
for these purposes??
-- 
View this message in context: 
http://n4.nabble.com/forecasting-tp974326p974326.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


[R] symbols plots - with circles

2009-12-15 Thread DispersionMap


Im doing a plot where i look at clusters of data with circles indicating how
big the cluster is:

palette(rainbow(1000, end = 0.9))
symbols(data$lab, data$bak, circles = var21, main = "Circles Plot", fg =
"grey", bg = 1:1000)


As i have lots and lots of data points to plot i get alot of circles.

The problem is that wjen i use colour in the circles the big circles cover
up the smaller ones sitting underneath.

What i really want is different sizes of circles to have different colours.


Any ideas how to fix this???





-- 
View this message in context: 
http://n4.nabble.com/symbols-plots-with-circles-tp964686p964686.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


Re: [R] categorical vs numerical

2009-12-05 Thread DispersionMap

im using w7 ultimate


Peter Ehlers wrote:
> 
> pkg:lattice is installed as part of the base R distribution.
> You don't need to install it.
> 
> DispersionMap wrote:
>> Thanks, ill give them whirl...when i was installing the lattice package i
>> got
>> the error in bold below...why does it say permission denied and what
>> effect
>> does this have?
> I guess that you're on Vista and don't have write permission
> for that directory.
> 
>   -Peter Ehlers
>> 
>>> utils:::menuInstallLocal()
>> package 'lattice' successfully unpacked and MD5 sums checked
>> updating HTML package descriptions
>> Warning message:
>> In file.create(f.tg) :
>>   cannot create file 'C:\PROGRA~1\R\R-29~1.2/doc/html/packages.html',
>> reason
>> 'Permission denied'
>> 
>>> local({pkg <- select.list(sort(.packages(all.available = TRUE)))
>> + if(nchar(pkg)) library(pkg, character.only=TRUE)})
>> Warning message:
>> package 'lattice' was built under R version 2.10.0 
>> 
>> I have it loaded 
>> 
>> 
>> 
>> Peter Ehlers wrote:
>>> Whoops, that should be
>>>
>>>   densityplot(~y|g, data=dat, plot.points=FALSE, layout=c(1,4))
>>>
>>>   -Peter Ehlers
>>>
>>> Peter Ehlers wrote:
>>>> You could try density plots:
>>>> If dat is your dataframe, y is your numerical vector and
>>>> g is your factor,
>>>>
>>>> library(lattice)
>>>> trellis.device(height=9, width=7)
>>>> densityplot(~g|y, data=dat, plot.points=FALSE, layout=c(1,4))
>>>>
>>>> See ?densityplot, ?panel.densityplot
>>>>
>>>>  -Peter Ehlers
>>>>
>>>> DispersionMap wrote:
>>>>> Thanks, however the group sizes are really big (each a,b,c.. category
>>>>> has
>>>>> 60,000 observations). Its hard to see whats going on withe the
>>>>> jittered
>>>>> stripchart, i just get big black blobs.
>>>>>
>>>>> Any other suggestions?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Peter Ehlers wrote:
>>>>>> If your group sizes are not too large, I would use jittered
>>>>>> stripcharts.
>>>>>> They're more informative than boxplots and much less subject to
>>>>>> misinterpretation. One warning, I'm not fond of the default pch=0.
>>>>>>
>>>>>>  -Peter Ehlers
>>>>>>
>>>>>> DispersionMap wrote:
>>>>>>> What ways are there to plot categorical vs numerical data in R.
>>>>>>>
>>>>>>>
>>>>>>> I have two columns: one with categorical data in 5 categories 
>>>>>>> a,b,c,d,e,
>>>>>>> and
>>>>>>> a numerical column with integers between 1 and 100.
>>>>>>>
>>>>>>> I have used a boxplot with a,b,c,d,e on the x-axis and an increasing
>>>>>>> numerical scale on the y-axis. This look fine but im looking for
>>>>>>> other
>>>>>>> ways
>>>>>>> to present the data.
>>>>>>>
>>>>>>>
>>>>>>> What other ways can i do this???
>>>>>>>
>>>>>> __
>>>>>> R-help@r-project.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.
>>>>>>
>>>>>>
>>>> __
>>>> R-help@r-project.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.
>>>>
>>>>
>>> -- 
>>> Peter Ehlers
>>> University of Calgary
>>> 403.202.3936
>>>
>>> __
>>> R-help@r-project.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.
>>>
>>>
>> 
> 
> -- 
> Peter Ehlers
> University of Calgary
> 403.202.3936
> 
> __
> R-help@r-project.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.
> 
> 

-- 
View this message in context: 
http://n4.nabble.com/categorical-vs-numerical-tp948817p949267.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


Re: [R] categorical vs numerical

2009-12-05 Thread DispersionMap

Thanks, ill give them whirl...when i was installing the lattice package i got
the error in bold below...why does it say permission denied and what effect
does this have?

> utils:::menuInstallLocal()
package 'lattice' successfully unpacked and MD5 sums checked
updating HTML package descriptions
Warning message:
In file.create(f.tg) :
  cannot create file 'C:\PROGRA~1\R\R-29~1.2/doc/html/packages.html', reason
'Permission denied'

> local({pkg <- select.list(sort(.packages(all.available = TRUE)))
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
Warning message:
package 'lattice' was built under R version 2.10.0 

I have it loaded 



Peter Ehlers wrote:
> 
> Whoops, that should be
> 
>   densityplot(~y|g, data=dat, plot.points=FALSE, layout=c(1,4))
> 
>   -Peter Ehlers
> 
> Peter Ehlers wrote:
>> You could try density plots:
>> If dat is your dataframe, y is your numerical vector and
>> g is your factor,
>> 
>> library(lattice)
>> trellis.device(height=9, width=7)
>> densityplot(~g|y, data=dat, plot.points=FALSE, layout=c(1,4))
>> 
>> See ?densityplot, ?panel.densityplot
>> 
>>  -Peter Ehlers
>> 
>> DispersionMap wrote:
>>> Thanks, however the group sizes are really big (each a,b,c.. category
>>> has
>>> 60,000 observations). Its hard to see whats going on withe the jittered
>>> stripchart, i just get big black blobs.
>>>
>>> Any other suggestions?
>>>
>>>
>>>
>>>
>>> Peter Ehlers wrote:
>>>> If your group sizes are not too large, I would use jittered
>>>> stripcharts.
>>>> They're more informative than boxplots and much less subject to
>>>> misinterpretation. One warning, I'm not fond of the default pch=0.
>>>>
>>>>  -Peter Ehlers
>>>>
>>>> DispersionMap wrote:
>>>>> What ways are there to plot categorical vs numerical data in R.
>>>>>
>>>>>
>>>>> I have two columns: one with categorical data in 5 categories 
>>>>> a,b,c,d,e,
>>>>> and
>>>>> a numerical column with integers between 1 and 100.
>>>>>
>>>>> I have used a boxplot with a,b,c,d,e on the x-axis and an increasing
>>>>> numerical scale on the y-axis. This look fine but im looking for other
>>>>> ways
>>>>> to present the data.
>>>>>
>>>>>
>>>>> What other ways can i do this???
>>>>>
>>>> __
>>>> R-help@r-project.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.
>>>>
>>>>
>>>
>> 
>> __
>> R-help@r-project.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.
>> 
>> 
> 
> -- 
> Peter Ehlers
> University of Calgary
> 403.202.3936
> 
> __
> R-help@r-project.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.
> 
> 

-- 
View this message in context: 
http://n4.nabble.com/categorical-vs-numerical-tp948817p949178.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


Re: [R] categorical vs numerical

2009-12-05 Thread DispersionMap

Thanks, however the group sizes are really big (each a,b,c.. category has
60,000 observations). Its hard to see whats going on withe the jittered
stripchart, i just get big black blobs.

Any other suggestions?




Peter Ehlers wrote:
> 
> If your group sizes are not too large, I would use jittered stripcharts.
> They're more informative than boxplots and much less subject to
> misinterpretation. One warning, I'm not fond of the default pch=0.
> 
>  -Peter Ehlers
> 
> DispersionMap wrote:
>> What ways are there to plot categorical vs numerical data in R.
>>
>>
>> I have two columns: one with categorical data in 5 categories a,b,c,d,e,
>> and
>> a numerical column with integers between 1 and 100.
>>
>> I have used a boxplot with a,b,c,d,e on the x-axis and an increasing
>> numerical scale on the y-axis. This look fine but im looking for other
>> ways
>> to present the data.
>>
>>
>> What other ways can i do this???
>>
> 
> __
> R-help@r-project.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.
> 
> 

-- 
View this message in context: 
http://n4.nabble.com/categorical-vs-numerical-tp948817p949117.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


[R] categorical vs numerical

2009-12-04 Thread DispersionMap


What ways are there to plot categorical vs numerical data in R.


I have two columns: one with categorical data in 5 categories a,b,c,d,e, and
a numerical column with integers between 1 and 100.

I have used a boxplot with a,b,c,d,e on the x-axis and an increasing
numerical scale on the y-axis. This look fine but im looking for other ways
to present the data.


What other ways can i do this???
-- 
View this message in context: 
http://n4.nabble.com/categorical-vs-numerical-tp948817p948817.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


[R] Ggplot2: Elegant Graphics for Data Analysis (Use R) (2009 Paperback)

2009-11-30 Thread DispersionMap


Is this book worth its dollar? If so, why?, if not, why not?

Cheers.
-- 
View this message in context: 
http://n4.nabble.com/Ggplot2-Elegant-Graphics-for-Data-Analysis-Use-R-2009-Paperback-tp931702p931702.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


Re: [R] Learning R

2009-11-30 Thread DispersionMap

Data Analysis and Graphics Using R - An Example-Based Approach 
John Maindonald and John Braun
2nd edn, Cambridge University Press, January 2007   



susan jacobs wrote:
> 
> Hi,
> 
> im working in R but honestly i don t know how to apply the formulas in my
> problem, can someone give some help?
> 
> 
> I already learn how we use the formulas but im not understanding the main
> issue in my problem.
> 
> 
> 
> Johannes Huesing wrote:
>> 
>> Esmail  [Mon, Nov 30, 2009 at 01:07:15PM CET]:
>> 
>>> ps: Just checked, 'R in a Nutshell':
>>> http://oreilly.com/catalog/9780596801717
>>> release date dec 2009/jan 2010
>> 
>> You can't really judge a book by its cover, and in this case not even
>> the cover is presented to us. But judging by the author's background,
>> I'd presume that you are likely to get a computer scientist's intro
>> to R. This is an angle that very few books have taken so far ... most
>> are written by statisticians who write from the problem solving point
>> of view. If you are a statistician, you are probably well served with
>> some of the books available on R. Among these, I too found Venables 
>> and Ripley a good read, as they give you some depth on S the language,
>> rather than talking about "101 wonderful things you can do with R".
>> -- 
>> Johannes Hüsing   There is something fascinating about
>> science. 
>>   One gets such wholesale returns of
>> conjecture 
>> mailto:johan...@huesing.name  from such a trifling investment of fact.   
>>  
>> http://derwisch.wikidot.com (Mark Twain, "Life on the
>> Mississippi")
>> 
>> __
>> R-help@r-project.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.
>> 
>> 
> 
> 

-- 
View this message in context: 
http://n4.nabble.com/Learning-R-tp931099p931666.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


Re: [R] column of dates into time series

2009-11-29 Thread DispersionMap

? like this do you mean...

> dput(Weeks)
structure(c(370L, 342L, 333L, 317L, 308L, 298L, 289L, 269L, 265L, 
257L, 254L, 253L, 252L, 249L, 243L, 243L, 239L, 239L, 236L, 234L, 
233L, 232L, 230L, 230L, 229L, 229L, 229L, 228L, 227L, 226L, 225L, 
222L, 218L, 217L, 216L, 215L, 215L, 214L, 214L, 214L, 212L, 211L, 
209L, 209L, 208L, 207L, 205L, 205L, 204L, 204L, 203L, 202L, 202L, 
201L, 200L, 199L, 197L, 197L, 197L, 197L, 195L, 194L, 194L, 194L, 
193L, 193L, 193L, 193L, 192L, 191L, 190L, 190L, 190L, 189L, 189L, 
189L, 189L, 189L, 189L, 188L, 188L, 187L, 187L, 186L, 183L, 182L, 
182L, 181L, 180L, 180L, 180L, 179L, 179L, 179L, 178L, 178L, 177L, 
177L, 177L, 13091L), .Names = c("2007-12-17", "2009-01-05", "2008-06-09", 
"2008-12-08", "2009-02-09", "2008-12-01", "2008-05-12", "2009-02-16", 
"2007-01-22", "2008-06-02", "2007-01-29", "2008-05-19", "2007-06-11", 
"2008-06-16", "2008-05-26", "2008-06-23", "2008-11-03", "2009-01-12", 
"2008-07-21", "2007-02-05", "2008-02-18", "2008-07-14", "2008-01-14", 
"2008-10-27", "2007-12-10", "2008-03-17", "2008-08-04", "2008-11-24", 
"2006-12-18", "2007-11-26", "2007-11-12", "2006-11-06", "2007-06-25", 
"2006-04-03", "2008-01-07", "2006-04-10", "2008-07-28", "2006-05-08", 
"2006-06-05", "2009-02-23", "2007-10-22", "2007-02-19", "2008-06-30", 
"2009-02-02", "2007-06-04", "2007-12-03", "2006-11-13", "2007-09-03", 
"2006-08-28", "2008-07-07", "2007-05-14", "2006-08-14", "2007-04-16", 
"2006-07-31", "2008-12-15", "2006-09-11", "2006-06-12", "2008-01-21", 
"2008-04-07", "2009-01-26", "2008-02-11", "2007-04-02", "2007-04-09", 
"2008-04-21", "2006-08-07", "2007-11-19", "2008-04-14", "2008-05-05", 
"2006-07-24", "2007-05-21", "2006-06-19", "2006-10-09", "2007-02-12", 
"2007-03-26", "2007-07-09", "2007-11-05", "2008-02-25", "2008-09-08", 
"2009-08-10", "2008-09-15", "2009-06-08", "2006-05-15", "2007-07-02", 
"2009-06-01", "2008-11-17", "2006-06-26", "2009-06-29", "2007-08-06", 
"2007-08-13", "2009-01-19", "2009-07-13", "2006-04-17", "2007-03-05", 
"2007-12-24", "2006-10-16", "2008-08-11", "2006-05-29", "2006-11-27", 
"2007-10-29", "(Other)"))




David Winsemius wrote:
> 
> How about a representation of the data that one could so something  
> with? By that I mean either by the "dump" method described in the  
> Posting Guide or by using dput:
>  > ttt <- c(1,2)
> 
>  > dput(ttt)
> c(1, 2)
> 
>  > dump("ttt", stdout() )
> ttt <-
> c(1, 2)
> 
> Did you honestly expect anyone in their right mind to reassemble that  
> data from the console text output???
> 
> On Nov 29, 2009, at 10:46 AM, DispersionMap wrote:
> 
>>
>> Thanks again David,
>>
>> Heres what happened:
>>
>>> Weeks<-summary(cut(data$Raised.Date, breaks="weeks"))
>>> Weeks
>> 2007-12-17 2009-01-05 2008-06-09 2008-12-08 2009-02-09 2008-12-01
>>   370342333317308298
>> 2008-05-12 2009-02-16 2007-01-22 2008-06-02 2007-01-29 2008-05-19
>>   289269265257254253
>> 2007-06-11 2008-06-16 2008-05-26 2008-06-23 2008-11-03 2009-01-12
>>   252249243243239239
>> 2008-07-21 2007-02-05 2008-02-18 2008-07-14 2008-01-14 2008-10-27
>>   236234233232230230
>> 2007-12-10 2008-03-17 2008-08-04 2008-11-24 2006-12-18 2007-11-26
>>   229229229228227226
>> 2007-11-12 2006-11-06 2007-06-25 2006-04-03 2008-01-07 2006-04-10
>>   225222218217216215
>> 2008-07-28 2006-05-08 2006-06-05 2009-02-23 2007-10-22 2007-02-19
>>   215214214214212211
>> 2008-06-30 2009-02-02 2007-06-04 2007-12-03 2006-11-13 2007-09-03
>>   209209

Re: [R] column of dates into time series

2009-11-29 Thread DispersionMap

Thanks again David,

Heres what happened:

> Weeks<-summary(cut(data$Raised.Date, breaks="weeks"))
> Weeks
2007-12-17 2009-01-05 2008-06-09 2008-12-08 2009-02-09 2008-12-01 
   370342333317308298 
2008-05-12 2009-02-16 2007-01-22 2008-06-02 2007-01-29 2008-05-19 
   289269265257254253 
2007-06-11 2008-06-16 2008-05-26 2008-06-23 2008-11-03 2009-01-12 
   252249243243239239 
2008-07-21 2007-02-05 2008-02-18 2008-07-14 2008-01-14 2008-10-27 
   236234233232230230 
2007-12-10 2008-03-17 2008-08-04 2008-11-24 2006-12-18 2007-11-26 
   229229229228227226 
2007-11-12 2006-11-06 2007-06-25 2006-04-03 2008-01-07 2006-04-10 
   225222218217216215 
2008-07-28 2006-05-08 2006-06-05 2009-02-23 2007-10-22 2007-02-19 
   215214214214212211 
2008-06-30 2009-02-02 2007-06-04 2007-12-03 2006-11-13 2007-09-03 
   209209208207205205 
2006-08-28 2008-07-07 2007-05-14 2006-08-14 2007-04-16 2006-07-31 
   204204203202202201 
2008-12-15 2006-09-11 2006-06-12 2008-01-21 2008-04-07 2009-01-26 
   200199197197197197 
2008-02-11 2007-04-02 2007-04-09 2008-04-21 2006-08-07 2007-11-19 
   195194194194193193 
2008-04-14 2008-05-05 2006-07-24 2007-05-21 2006-06-19 2006-10-09 
   193193192191190190 
2007-02-12 2007-03-26 2007-07-09 2007-11-05 2008-02-25 2008-09-08 
   190189189189189189 
2009-08-10 2008-09-15 2009-06-08 2006-05-15 2007-07-02 2009-06-01 
   189188188187187186 
2008-11-17 2006-06-26 2009-06-29 2007-08-06 2007-08-13 2009-01-19 
   183182182181180180 
2009-07-13 2006-04-17 2007-03-05 2007-12-24 2006-10-16 2008-08-11 
   180179179179178178 
2006-05-29 2006-11-27 2007-10-29(Other) 
   177177177  13091


As you can see its come out a little disorderly though.
I have to plot the number of events under each date in a time series.

How do i order the dates and their counts?






David Winsemius wrote:
> 
> 
> On Nov 29, 2009, at 7:52 AM, Linlin Yan wrote:
> 
>> There is no year() function. Maybe you can try format() instead.
>>
>> On Sun, Nov 29, 2009 at 8:44 PM, DispersionMap > > wrote:
>>>
>>> i have a column of dates in this format:
>>>
>>> data[,"Raised.Date"] <- as.Date(data[,"Raised.Date"], "%d/%m/%Y");
>>> data[1:10,"Raised.Date"]
>>> [1] "2006-07-07" "2006-07-07" "2006-04-03" "2006-04-03" "2006-04-03"
>>> "2006-04-03" "2006-04-03" "2006-04-03" "2006-04-03" "2006-04-03"
>>>
>>> I can turn them into months like this...
>>>
>>> Month<-months(data[,"Raised.Date"])
>>> Month[1:10]
>>> [1] "July"  "July"  "April" "April" "April" "April" "April" "April"  
>>> "April"
>>> "April"
>>>
>>>
>>> But i also want to turn them into years (and also weeks later on),  
>>> so tried
>>> this...
> 
> library(chron)
> ?cut.dates
> 
> The argument breaks has several options including one of  c("days",  
> "weeks", "months", "year")
> 
>  > dts <- Sys.Date() - 1:20
> 
>  > cut(dts, breaks="weeks")
>   [1] 2009-11-23 2009-11-23 2009-11-23 2009-11-23 2009-11-23  
> 2009-11-23 2009-11-16 2009-11-16 2009-11-16 2009-11-16
> [11] 2009-11-16 2009-11-16 2009-11-16 2009-11-09 2009-11-09 2009-11-09  
> 2009-11-09 2009-11-09 2009-11-09 2009-11-09
> Levels: 2009-11-09 2009-11-16 2009-11-23
> 
> I was a bit puzzled when I tried cut.dates as the function which  
> throws a function not found error.
> 
> 
>>>
>>> Year<-year(data[,"Raised.Date"])
>>> Error: could not find function "year"
>>
> 
> 
> David Winsemius, MD
> Heritage Laboratories
> West Hartford, CT
> 
> __
> R-help@r-project.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.
> 
> 

-- 
View this message in context: 
http://n4.nabble.com/column-of-dates-into-time-series-tp930699p930744.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


[R] column of dates into time series

2009-11-29 Thread DispersionMap

i have a column of dates in this format:

data[,"Raised.Date"] <- as.Date(data[,"Raised.Date"], "%d/%m/%Y"); 
data[1:10,"Raised.Date"]
[1] "2006-07-07" "2006-07-07" "2006-04-03" "2006-04-03" "2006-04-03"
"2006-04-03" "2006-04-03" "2006-04-03" "2006-04-03" "2006-04-03"

I can turn them into months like this...

Month<-months(data[,"Raised.Date"])
Month[1:10]
[1] "July"  "July"  "April" "April" "April" "April" "April" "April" "April"
"April"


But i also want to turn them into years (and also weeks later on), so tried
this...

Year<-year(data[,"Raised.Date"])
Error: could not find function "year"


thanks.
-- 
View this message in context: 
http://n4.nabble.com/column-of-dates-into-time-series-tp930699p930699.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


Re: [R] Whats happening to the forum???

2009-11-28 Thread DispersionMap


Im lost i want to post on the other forum...the address was something
like...   http://old.nabble.com/R   ...to get help with using R but i kept
getting redirected to this one (http://n4.nabble.com), and when i tried to
post a querie it made me sign up so i thought the forum was changing or
being updated or something like that.

When i  type in   http://old.nabble.com/   then click I get redirected to...  
R http://n4.nabble.com/R-f789695.html  ...?? 



David Winsemius wrote:
> 
> 
> On Nov 28, 2009, at 12:26 PM, DispersionMap wrote:
> 
>>
>> Whats happening? everthings changing round here...
> 
> Can you be any less vague?
> 
>> plus alot less
>> posts/users..
> 
> And perhaps offer some data to accomapny your inferences?
> 
> http://dir.gmane.org/gmane.comp.lang.r.general
> 
>> -- 
>> View this message in context:
>> http://n4.nabble.com/Whats-happening-to-the-forum-tp913858p913858.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> __
>> R-help@r-project.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.
> 
> David Winsemius, MD
> Heritage Laboratories
> West Hartford, CT
> 
> __
> R-help@r-project.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.
> 
> 

-- 
View this message in context: 
http://n4.nabble.com/Whats-happening-to-the-forum-tp913858p919285.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


Re: [R] Whats happening to the forum???

2009-11-28 Thread DispersionMap

im confused, everytime i try to get to the old forum i get redirected here
though???

i dont know why.


Sharpie wrote:
> 
> 
> DispersionMap wrote:
>> 
>> Whats happening? everthings changing round here...plus alot less
>> posts/users..
>> 
> 
> R-Help is a mailing list which is independent of Nabble.  Nabble is only
> one of many front-ends that provides a "forum-like" interface to the
> mailing list.  Therefore, the users of the R-Help mailing list probably
> can't answer this question-- you should contact the Nabble administrators.
> 
> Hope this helps!
> 
> -Charlie
> 

-- 
View this message in context: 
http://n4.nabble.com/Whats-happening-to-the-forum-tp913858p918167.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


[R] Whats happening to the forum???

2009-11-28 Thread DispersionMap

Whats happening? everthings changing round here...plus alot less
posts/users..
-- 
View this message in context: 
http://n4.nabble.com/Whats-happening-to-the-forum-tp913858p913858.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.


[R] alternatives to mosiac plots and ?3D? mosiac plots

2009-11-27 Thread DispersionMap

i had some great success with mosiacplots...

http://stat.ethz.ch/R-manual/R-patched/library/graphics/html/mosaicplot.html
http://stat.ethz.ch/R-manual/R-patched/library/graphics/html/mosaicplot.html 

...does anyone know of any other hidden gems out there that allow you to
examine the relationship among two or more categorical variables.

Also is it possible to add a third dimension to a mosiac plot, as in adding
a contour plot to it...if so how is it done?


-- 
View this message in context: 
http://n4.nabble.com/alternatives-to-mosiac-plots-and-3D-mosiac-plots-tp865536p865536.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.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.