Re: [R] Creating a SQL R package

2017-11-15 Thread Hasan Diwan
Joao,

On 15 November 2017 at 05:39, João Paulo Lemes Machado <
lemesmach...@gmail.com> wrote:

> I intend to create a package for the R that
> makes the SQL language commands available for use.  What do you think? Any
> tips on
> where to start?
>

https://github.com/ggrothendieck/sqldf seems to be what you're trying to
duplicate. -- H



-- 
OpenPGP: https://sks-keyservers.net/pks/lookup?op=
get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using http://bit.ly/
hd1ScheduleRequest.
Si vous voudrais faire connnaisance, allez a http://bit.ly/
hd1ScheduleRequest.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] R vs PYTHON vs SAS vs SPSS?

2017-11-30 Thread Hasan Diwan
Yes

On 30 November 2017 at 22:28,  wrote:

> I am a mature learner; 3 masters
> some doctoral work “ statistics for social sciences; psychological
> statistics “
> worked in spss and sas 2005 – 2006
> now have forgotten ; relearning
> my question is this can I do everything in R and Python and SAS studio
> that I did in SPSS and the paid variation of SAS we used in doctoral
> statistics class?
> Can I do in Stat in R or Python or SAS studio
> everything I need to do in multiple regression; ANOVA; ANCOVA etc
> ?
> that I did/was starting to do in SPSS?
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.




-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
http://bit.ly/hd1ScheduleRequest.
Si vous voudrais faire connnaisance, allez a
http://bit.ly/hd1ScheduleRequest.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] change location of temporary files

2018-02-23 Thread Hasan Diwan
Kumar,
tempfile has a dir parameter that you can use to designate the directory
the file will be created in.-- H

On 23 February 2018 at 10:52, Kumar Mainali  wrote:

> I would like to change where R stores the temporary files to my external
> hard drive in my iMac. This is important because the temporary files R
> creates are huge and I do not have enough available space in my internal
> HD. Again, this is for macOS.
>
> This change has to be temporary. Later I need to use the usual location for
> temp files in the internal HD.
>
> Thanks in advance,
> Kumar Mainali
>
> --
> Postdoctoral Associate
> Department of Biology
> University of Maryland, College Park
> ᐧ
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>



-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
http://bit.ly/hd1ScheduleRequest.
Si vous voudrais faire connnaisance, allez a
http://bit.ly/hd1ScheduleRequest.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Issues when Trying to Install Packages in R

2018-06-11 Thread Hasan Diwan
Paul,
install.packages('lubridate', type='source',
repos='https://cran.rstudio.com') # worked for me

You should be able to copy/paste the line into an R session. -- H
-- 
OpenPGP: https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using bit.ly/hd1AppointmentRequest.
Si vous voudrais faire connnaisance, allez a bit.ly/hd1AppointmentRequest.

Sent from my mobile device
Envoye de mon portable

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Any Unsupervised Learning Algorithm for Time Series Forecasting in R

2018-06-20 Thread Hasan Diwan
Paul,

On Wed, 20 Jun 2018 at 09:04, Paul Bernal  wrote:
> I would like to know if R has any unsupervised algorithm to generate 
> forecasts for historical data.

Yes , it does. Perhaps you'd be kind enough to provide a sample of
your data --dput(sample(pauls.data)) on gist.github.com -- and what
you wish to achieve with it? Many thanks! -- H
-- 
OpenPGP: https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using bit.ly/hd1AppointmentRequest.
Si vous voudrais faire connnaisance, allez a bit.ly/hd1AppointmentRequest.

Sent from my mobile device
Envoye de mon portable

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] OT --- grammar.

2018-06-24 Thread Hasan Diwan
On Sun, 24 Jun 2018 at 14:46, Rolf Turner  wrote:
>
>
> Does/should one say "the degrees of freedom is defined to be" or "the
> degrees of freedom are defined to be"?

"are", the noun in your statement is "degrees", while the fragment "of
freedom" acts as an adjective, narrowing the scope of the term
"degrees". Hope that helps... -- H
-- 
OpenPGP: https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using bit.ly/hd1AppointmentRequest.
Si vous voudrais faire connnaisance, allez a bit.ly/hd1AppointmentRequest.

Sent from my mobile device
Envoye de mon portable

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] A question on Statistics

2018-06-30 Thread Hasan Diwan
Christofer,
On Sat, 30 Jun 2018 at 12:54, Jeff Newmiller  wrote:
>
> You should use Stack Exchange for questions about statistics.

Specifically, https://stats.stackexchange.com/ -- H
-- 
OpenPGP: https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using bit.ly/hd1AppointmentRequest.
Si vous voudrais faire connnaisance, allez a bit.ly/hd1AppointmentRequest.

Sent from my mobile device
Envoye de mon portable

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Fwd: Question

2018-07-08 Thread Hasan Diwan
Farshad,
On Sun, 8 Jul 2018 at 09:29, Farshad Fathian  wrote:
>
> Thank you so much for your reply. But when I install the "RWinEdt" package,
> the R unable to install it. I see the below warning:
>
> "Error: package or namespace load failed for ‘RWinEdt’:
>  package ‘RWinEdt’ was installed by an R version with different internals;
> it needs to be reinstalled for use with this R version"

What do the following statements:
> remove.packages('RWinEdt'); install.packages('RWinEdt')
yield?

--
OpenPGP: https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using bit.ly/hd1AppointmentRequest.
Si vous voudrais faire connnaisance, allez a bit.ly/hd1AppointmentRequest.

Sent from my mobile device
Envoye de mon portable

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] (no subject)

2018-07-09 Thread Hasan Diwan
https://imgur.com/a/0f72Fsz results from the following code:

ggplot()+borders("world", colour="gray50",
fill="gray50")+geom_line(aes(x=Longitude, y=Latitude), birds)

It's ugly, but it will give you a starting point. -- H
On Mon, 9 Jul 2018 at 10:53, Laura Steel  wrote:
>
> I am a beginner to R and I need to map some Atlantic puffin migration routes
> onto a map of the Northern Hemisphere. I have a latitude and longitude point
> per bird, per day. I would like to be able to plot the routes of all my
> birds on one map and ideally so that I can see at which date they are at
> each location.
>
> This is a shortened version of my data for one bird only.
>
> Bird Date  Latitude Longitude
> eb80976 16/07/2012  50.99   -5.85
> eb80976 17/07/2012  52.09   -4.58
> eb80976 18/07/2012  49.72   -5.56
> eb80976 19/07/2012  51.59   -3.17
> eb80976 20/07/2012  52.45   -2.03
> eb80976 21/07/2012  56.015  -10.51
>
> Any help would be much appreciated. I am not totally sure where to start!
> Many thanks.
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.



-- 
OpenPGP: https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using bit.ly/hd1AppointmentRequest.
Si vous voudrais faire connnaisance, allez a bit.ly/hd1AppointmentRequest.

Sent from my mobile device
Envoye de mon portable

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Multiple Histograms in R

2017-04-19 Thread Hasan Diwan
Prateek,
I'm shocked this isn't answered previously, but you can try the par command
(mfrow and mfcol parameters) and par(mfrow=n, mfcol=m) will generate n
plots per row and m rows per column. For subsequent questions, please do a
search through the archives before asking. -- H

On 19 April 2017 at 06:05, prateek pande  wrote:

> Hi,
>
> I have a data as mentioned below(at the bottom)
>
> Now out of that data i have to create multiple histograms in a single view
> in  R. On that histogram i need on x -axis binned data with Breaks 10 and
> on y axis event rate . Here churn is dependent variable.
>
>
> *for example, for mou_mean , on x -axis on histogram i need Bins(mou_mean)
> and on y - axis in need Churn%age. *
> *Bins(mou_mean)*
>
> *Churn %age*
> 23-43  0.23%
> 33-53  0.5%
> 43-63   0.3%
> 53-73   0.4%
> 63-83   0.7%
> 83-1030.8%
>
> Please help
>
>
> *mou_mean*
>
> *totalmrc_mean*
>
> *rev_range*
>
> *mou_range*
>
> *Churn*
>
> 23
>
> 24
>
> 25
>
> 27
>
> 1
>
> 45
>
> 46
>
> 47
>
> 49
>
> 1
>
> 43
>
> 44
>
> 45
>
> 47
>
> 1
>
> 45
>
> 46
>
> 47
>
> 49
>
> 0
>
> 56
>
> 57
>
> 58
>
> 60
>
> 0
>
> 67
>
> 68
>
> 69
>
> 71
>
> 1
>
> 67
>
> 68
>
> 69
>
> 71
>
> 0
>
> 44
>
> 45
>
> 46
>
> 48
>
> 1
>
> 33
>
> 34
>
> 35
>
> 37
>
> 0
>
> 90
>
> 91
>
> 92
>
> 94
>
> 1
>
> 87
>
> 88
>
> 89
>
> 91
>
> 1
>
> 76
>
> 77
>
> 78
>
> 80
>
> 1
>
> 33
>
> 34
>
> 35
>
> 37
>
> 1
>
> 44
>
> 45
>
> 46
>
> 48
>
> 1
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>



-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
http://bit.ly/hd1ScheduleRequest.
Si vous voudrais faire connnaisance, allez a
http://bit.ly/hd1ScheduleRequest.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] RJDBC

2017-05-02 Thread Hasan Diwan
Anthony,
Did you try options(java.parameters = "-Xmx8g
-Djava.oracle.jdbc.timezoneAsRegion=false")
instead of specifying the java property separately? -- H

On 2 May 2017 at 15:18, Nelson Anthony  wrote:

> Hi all,
>
>
>
> I am trying to connect to Database  using RJDBC but due to some DB & Server
> timezone mismatch I am facing below error message.
>
>
>
> Error in .jcall(drv@jdrv, "Ljava/sql/Connection;", "connect",
> as.character(url)[1],  :
>
>   java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
>
> ORA-01882: timezone region not found
>
>
>
> I tried to fix this issue using java by using this parameter
> “-Doracle.jdbc.timezoneAsRegion=false”
> and it worked
>
>
>
> But I am trying to apply the same setting in R using option settings, but
> it is not working. Also, I tried updating Rprofile
>
>
>
> *My code snippet:*
>
>
>
> Sys.setenv(JAVA_HOME='/usr/lib/jvm/java-8-openjdk-amd64')
>
> options(java.parameters = "-Xmx8g")
>
> options(java.oracle.jdbc.timezoneAsRegion="false")
>
> dbcDriver <- JDBC(driverClass="oracle.jdbc.OracleDriver",
> classPath="/usr/lib/oracle/12.2/client64/lib/ojdbc8.jar")
>
> pcm_stg_conn <- dbConnect(jdbcDriver, "jdbc:oracle:thin:@//hostname:
> 1521/SID",
> "username", "password").
>
>
>
> Can you please help in resolving this issue
>
>
>
>
>
> Thanks & Regards.
>
> Anthony Nelson
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.




-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
http://bit.ly/hd1ScheduleRequest.
Si vous voudrais faire connnaisance, allez a
http://bit.ly/hd1ScheduleRequest.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] train function in caret package

2017-05-20 Thread Hasan Diwan
A dput of your data may be helpful, Elahe? -- H[

On 19 May 2017 at 16:56, Elahe chalabi via R-help 
wrote:

> Any answer?!
>
> On Friday, May 19, 2017 6:33 AM, Elahe chalabi via R-help <
> r-help@r-project.org> wrote:
>
>
>  Hi all,
>
> I'm running train function from caret package on my data set patientdata:
>
> model=train(type~., data=patientdata, method="lvq",
> preProcess="scale", trControl=control)
> and I get this error:
>
> Error in comp(expr, env = envir, options = list(suppressUndefined =
> TRUE)) :
>
> could not find function "mayCallBrowser"
> Does anyone know how should I solve it?!
>
> Thanks for any help!
> Elahe
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>



-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
http://bit.ly/hd1ScheduleRequest.
Si vous voudrais faire connnaisance, allez a
http://bit.ly/hd1ScheduleRequest.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Post for R

2017-05-31 Thread Hasan Diwan
Carrie,
I would suggest a few things before posting your code here:
- Put a dput(df)
- Format it properly, as it stands it won't compile, because you're missing
newlines/semicolons between, e.g. Z <- list()*; *G <- list(); for (i in
length(L1)){  Z=data.frame(L1[i])*;* G <- split(Z$submax,"0.02")*;*
 print(G)  }
-- H

On 31 May 2017 at 19:48, carrie wang via R-help 
wrote:

>
> Hello,
> I want to split the dataframe into 1000 groups based on two column
> values(max value and second max value). First, I made two lists L1 and L2.
> L1 is the list divided into 100 groups based on the range of max value and
> L2 is divided into 10 groups based on the second max values. Now I want to
> do the combinations based on L1 and L2. I want to do a for loop for L1 and
> for each element in L1, I split it into 10 groups based on L2. I tried to
> write the code, but it does not work.
>
> L1<-split(df,cut(df$max,seq(0,1,by=0.01)))L2<-split(df,cut(d
> f$submax,seq(0,0.2,by=0.02)))
> Z<-list()G<-list()for (i in length(L1)){  Z=data.frame(L1[i])  G <-
> split(Z$submax,"0.02")  print(G)  }
> Thanks so much!Carrie
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posti
> ng-guide.html
> and provide commented, minimal, self-contained, reproducible code.




-- 
OpenPGP: https://sks-keyservers.net/pks/lookup?op=
get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using http://bit.ly/
hd1ScheduleRequest.
Si vous voudrais faire connnaisance, allez a http://bit.ly/
hd1ScheduleRequest.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] How export data set (available in the package) from R?

2017-07-29 Thread Hasan Diwan
write.csv(flchain, 'flchain.csv') should import into Excel without
problems. -- H

On 29 July 2017 at 23:27, Jeff Newmiller  wrote:

> Read the help file for the survival package. Probably use the data
> function to retrieve it,  and write it out using the write.table function.
> --
> Sent from my phone. Please excuse my brevity.
>
> On July 29, 2017 8:47:51 PM PDT, Ted via R-help 
> wrote:
> >"Data set flchain available in the survival  package".  How can I
> >get it (from R)  as Excel file? Thanks!
> >
> >   [[alternative HTML version deleted]]
> >
> >__
> >R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >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 -- To UNSUBSCRIBE and more, see
> 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.
>



-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
http://bit.ly/hd1ScheduleRequest.
Si vous voudrais faire connnaisance, allez a
http://bit.ly/hd1ScheduleRequest.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] My very first loop!! I failed. May I have some start-up aid?

2017-08-18 Thread Hasan Diwan
[answers inline]

On 18 August 2017 at 20:08, Dagmar  wrote:
>
> myframe<- data.frame (ID=c("Ernie", "Ernie","Ernie","Ernie"),
> Timestamp=c("24.09.2012 08:00", "24.09.2012 09:00", "24.09.2012 10:00",
> "25.09.2012 10:00"), Longitude=c("8.481","8.482","8.483","8.481"),
> Latitude=c("54.753","54.753","54.752","54.751")
> )
> myframe
>
> # Now this is where my loop is supposed to start. In this example I want
> to run the following functions 3 times. (In real life more often.) How do I
> do that?
>
> library(adehabitatHR)
> library(rgdal)
>

you should use require instead of library if this is a script, require
returns boolean, whereas library raises an exception.

mysample <- myframe[sample(1:nrow(myframe), 3,replace=FALSE),]
> mysample
> mysampletime <- as.POSIXct (strptime(as.character(mysample$Timestamp),
> "%d.%m.%Y %H:%M"), tz="GMT")
> mysamplexy <- project (cbind (mysample$Longitude, mysample$Latitude),
> "+proj=utm +zone=32 +ellps=WGS84")
> colnames(mysamplexy) <- c ("xCord", "yCord")
> ID <- mysample$ID
> datltraj <- as.ltraj(mysamplexy, mysampletime, id=ID)
> Ddat <- BRB.D(datltraj, Tmax=21600, Lmin=36)
> BRBdat <- BRB(datltraj, D= Ddat,type=c("UD"),Tmax=21600,Lmin=36, hmin=100)
> kernel.area(BRBdat, unout=c("km2"))
>
> # unfortunately my data are not a very good example. Sorry about that. But
> I guess you know what I mean.
>
> # Because I wish to run the functions three times I do want a data frame
> (or matrix) in the end, which includes the results (kernel areas): That
> means 12 columns and the three lines.
>
> # How do I do that?
>

Use the rep function, with times being 3? Best of luck -- H


-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
http://bit.ly/hd1ScheduleRequest.
Si vous voudrais faire connnaisance, allez a
http://bit.ly/hd1ScheduleRequest.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] converting Twitter data from txt file

2015-04-22 Thread Hasan Diwan
On 22 April 2015 at 13:05, Erin Hodgess  wrote:

> Hello!
>
> Someone gave me a text file of Twitter data to look at.  I've used the
> twitter package to do the actual downloading and getting the data into nice
> R form.
>
> Is anyone familiar with a function to convert the twitter text into that
> good form please?
>

Would it be possible to post a sample of this data? -- H

>
> Thanks,
> Sincerely,
> Erin
>
>
> --
> Erin Hodgess
> Associate Professor
> Department of Mathematical and Statistics
> University of Houston - Downtown
> mailto: erinm.hodg...@gmail.com
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>



-- 
OpenPGP: https://hasan.d8u.us/gpg.key
Sent from my mobile device
Envoyé de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Fitting a Tweedie distribution

2015-01-02 Thread Hasan Diwan
The tweedle package[1] claims to have "functions for computing and fitting
the Tweedie family of distributions". Hope that helped. -- H
1. http://cran.r-project.org/web/packages/tweedie

On 2 January 2015 at 10:33, Paul Hudson  wrote:

> Hello all,
>
> I want to fit a tweedie distribution to the data I have.
>
> The R packages I have been able to find assume that I want to use it as
> part as of a generalized linear model.
>
> This is not the case, I want to directly fit the distribution to the data.
>
> Is there a package that allows this?
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>



-- 
OpenPGP: https://hasan.d8u.us/gpg.key
Sent from my mobile device
Envoyé de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Yodlee CRAN package

2015-01-13 Thread Hasan Diwan
Does anyone know of a CRAN package to access Yodlee.com's Aggregation
API[1]? Many thanks -- H

-- 
OpenPGP: https://hasan.d8u.us/gpg.key
Sent from my mobile device
Envoyé de mon portable
1. http://developer.yodlee.com/Aggregation_API

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] how to draw paired mosaic plot?

2015-02-06 Thread Hasan Diwan
The stats package has a mosaicplot function. Perhaps that would help? -- H

On 6 February 2015 at 03:46, meng  wrote:

> Hi all:
> If there are two numeric variable:x,y, and I can get paired scatter plot
> by function "pairs".But if x and y are character, and I want to get paired
> mosaic plot,which function should be used then?
>
>
> Many thanks!
> My best.
>
>
>
>
>
>
> --
> QQ: 1733768559
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>



-- 
OpenPGP: https://hasan.d8u.us/gpg.key
Sent from my mobile device
Envoyé de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] How many digits are there in left of dot of 0.0001 ?

2015-02-25 Thread Hasan Diwan
On 25 February 2015 at 17:55, ce  wrote:

> Dear all,
>
> I would like to count how many digits are there on the left of a the dot
> of a numeric variable
>

Left? An infinite number... What does this have to do with R, though? -- H

>
> a=0.0001
>
> thanks
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>



-- 
OpenPGP: https://hasan.d8u.us/gpg.key
Sent from my mobile device
Envoyé de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] How many digits are there in left of dot of 0.0001 ?

2015-02-25 Thread Hasan Diwan
Ahh... The exponent of your number in scientific notation, which you can
obtain using:

format(a.number, scientific=TRUE)

Hope that helps.. -- H

On 25 February 2015 at 18:43, ce  wrote:

>
> Sorry I meant right. I want to do it R of course. result should be 4
> naturally. On the left answer I want would be 1 ,
>
> -Original Message-
> From: "Hasan Diwan" [hasan.di...@gmail.com]
> Date: 02/25/2015 09:28 PM
> To: "R Project Help" 
> Subject: Re: [R] How many digits are there in left of dot of 0.0001 ?
>
> On 25 February 2015 at 17:55, ce  wrote:
>
> > Dear all,
> >
> > I would like to count how many digits are there on the left of a the dot
> > of a numeric variable
> >
>
> Left? An infinite number... What does this have to do with R, though? -- H
>
> >
> > a=0.0001
> >
> > thanks
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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.
> >
>
>
>
> --
> OpenPGP: https://hasan.d8u.us/gpg.key
> Sent from my mobile device
> Envoyé de mon portable
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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
>



-- 
OpenPGP: https://hasan.d8u.us/gpg.key
Sent from my mobile device
Envoyé de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Instagram Analysis

2018-09-25 Thread Hasan Diwan
Michael,
On Tue, 25 Sep 2018 at 08:15, Michael Haenlein  wrote:
> I'm looking for an R package that allows me to analyze Instagram.
> Specifically I would like to download for a given account the list of other
> accounts that either this account follows or that follow this account (the
> followers and following numbers).
> any other way to get this information in an easy way?

Send a get request to
https://api.instagram.com/v1/users/{user-id}/follows?access_token=ACCESS-TOKEN
and you'll get JSON back with (among other things) the accounts said
user follows. Hope that helps... Feel free to drop me a line off-list
should you need further help. -- H


-- 
OpenPGP: https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using bit.ly/hd1AppointmentRequest.
Si vous voudrais faire connnaisance, allez a bit.ly/hd1AppointmentRequest.

Sent from my mobile device
Envoye de mon portable

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] R and factorytalk historian

2018-12-12 Thread Hasan Diwan
Could you not script Excel to export automatically to CSV --
https://stackoverflow.com/a/10803229/783412, for example -- and import the
result into R? -- H

On Wed, 12 Dec 2018 at 07:17, PIKAL Petr  wrote:

> Hi
>
> Well, the final answer is that data from FTH could be transfered to other
> software **only** through Excel.
>
> Regarding RetroEncabulator, readings could be enahanced by extensive and
> elaborate use of nanoputian molecules chained together.
>
> Cheers
> Petr
>
> > -Original Message-
> > From: Viechtbauer, Wolfgang (SP)
> > 
> > Sent: Wednesday, December 12, 2018 11:21 AM
> > To: PIKAL Petr ; r-help 
> > Subject: RE: R and factorytalk historian
> >
> > Dear Petr,
> >
> > Sorry, no experience with the FTH, but related to this, has anybody
> gotten R to
> > interface nicely with the Retro Encabulator, providing live read outs of
> the
> > synchronizing cardinal grammeters?
> >
> > (my apologies, I just couldn't resist)
> >
> > Best,
> > Wolfgang
> >
> > >-Original Message-
> > >From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of PIKAL
> > >Petr
> > >Sent: Tuesday, 11 December, 2018 16:09
> > >To: r-help
> > >Subject: [R] R and factorytalk historian
> > >
> > >Hallo all
> > >
> > >Does anybody know if R could be used directly with FactoryTalk
> > >Historian programme from Rockwell automation.
> > >
> > >It is probably possible to use Excel as interface but I would prefer
> > >not to.
> > >
> > >Best regards.
> > >
> > >Petr Pikal
> Osobní údaje: Informace o zpracování a ochraně osobních údajů obchodních
> partnerů PRECHEZA a.s. jsou zveřejněny na:
> https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information
> about processing and protection of business partner’s personal data are
> available on website:
> https://www.precheza.cz/en/personal-data-protection-principles/
> Důvěrnost: Tento e-mail a jakékoliv k němu připojené dokumenty jsou
> důvěrné a podléhají tomuto právně závaznému prohláąení o vyloučení
> odpovědnosti: https://www.precheza.cz/01-dovetek/ | This email and any
> documents attached to it may be confidential and are subject to the legally
> binding disclaimer: https://www.precheza.cz/en/01-disclaimer/
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>


-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Mailinglist

2019-01-06 Thread Hasan Diwan
Maybe you could put the CSV in a gist or something? -- H

On Sun, 6 Jan 2019 at 10:58, Rachel Thompson 
wrote:

> Hi Rich,
>
> I really feel lost at this point.
> I need a code that helps me count the phone activity level(high/low/none),
> the screen activity (on/off) and the amount calls and SMS of each subject.
>
> 1. I want to have a summary of how many times a specific subject got called
> (CallLogProbe)
> 2. I want to have a summary of how many times a specific subject got a text
> message (SMS probe)
> 3. I want to have a summary of how many times a specific subject
> - Turned their screen on - True  (ScreenProbe)
> - Or did not turn their screen on - False (ScreenProbe)
> 4.  I want to have a summary of the activity level of a specific subject
> - Activity level - none (ActivityProbe)
> - Activity level- low (ActivityProbe)
> - Activity level - High  (ActivityProbe)
>
> I want to do this for all the 36 subjects(Participants).
> In the end, I have to define the percentages and cutoff points of what is
> considered low-medium-high, based on what the results of all the subjects
> are. So I am able to see if a specific subject has low social interaction
> etc.
>
> I have tried a lot, with the help of youtube etc. But I feel as if I am
> trying a lot of things but without clearly knowing if it is the right step.
> I have a csv file, but I need to look into what Jeff said about the guides.
> So I am able to share it.
>
> Best.
>
>
> On Sun, Jan 6, 2019 at 11:51 AM Rich Shepard 
> wrote:
>
> > On Sun, 6 Jan 2019, Rachel Thompson wrote:
> >
> > > I am an intern from Amsterdam and I have to do an analysis in R. I
> spoke
> > > to my professor in Amsterdam and my supervisor's here in Boston. But
> they
> > > are to busy to help. I informed them from the start that I am not
> > familiar
> > > with R(Rstudio) and they told me that I would receive guidance. So
> since
> > > they can not help me, I decided to share my problem online. (It is a
> CVS
> > > file imported into R)
> >
> > Rachel,
> >
> >I find it interesting that you're put in such a difficult position.
> I've
> > not followed this thread from the start so my comments might be redundant
> > or
> > inappropriate.
> >
> >If you can, describe the problem. That is, what are you being asked to
> > find and what are the available data? This information helps us to guide
> > you
> > to learning the mechanics for accomplishing your task with R.
> >
> > Regards,
> >
> > Rich
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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.
> >
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>


-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Mailinglist

2019-01-07 Thread Hasan Diwan
dput(sample(mydata, n=25)) is probably going to be more representative. -- H

On Mon, 7 Jan 2019 at 00:56, PIKAL Petr  wrote:

> Hi Rachel.
>
> You already have got several suggestions, but results depend on structure
> of your data. The best way from your side would be just copy a part of your
> data directly to email and preferable way is to use "dput".
>
> Assuming your data already transfered to R are called "mydata".
>
> You can just copy otput of
>
> dput(mydata[1:30,])
>
> to your next mail.
>
> Cheers
> Petr
>
>
> > -Original Message-
> > From: R-help  On Behalf Of Rachel Thompson
> > Sent: Sunday, January 6, 2019 7:49 PM
> > To: Rich Shepard 
> > Cc: r-help mailing list 
> > Subject: Re: [R] Mailinglist
> >
> > Hi Rich,
> >
> > I really feel lost at this point.
> > I need a code that helps me count the phone activity
> level(high/low/none),
> > the screen activity (on/off) and the amount calls and SMS of each
> subject.
> >
> > 1. I want to have a summary of how many times a specific subject got
> called
> > (CallLogProbe)
> > 2. I want to have a summary of how many times a specific subject got a
> text
> > message (SMS probe)
> > 3. I want to have a summary of how many times a specific subject
> > - Turned their screen on - True  (ScreenProbe)
> > - Or did not turn their screen on - False (ScreenProbe)
> > 4.  I want to have a summary of the activity level of a specific subject
> > - Activity level - none (ActivityProbe)
> > - Activity level- low (ActivityProbe)
> > - Activity level - High  (ActivityProbe)
> >
> > I want to do this for all the 36 subjects(Participants).
> > In the end, I have to define the percentages and cutoff points of what is
> > considered low-medium-high, based on what the results of all the subjects
> > are. So I am able to see if a specific subject has low social interaction
> > etc.
> >
> > I have tried a lot, with the help of youtube etc. But I feel as if I am
> > trying a lot of things but without clearly knowing if it is the right
> step.
> > I have a csv file, but I need to look into what Jeff said about the
> guides.
> > So I am able to share it.
> >
> > Best.
> >
> >
> > On Sun, Jan 6, 2019 at 11:51 AM Rich Shepard 
> > wrote:
> >
> > > On Sun, 6 Jan 2019, Rachel Thompson wrote:
> > >
> > > > I am an intern from Amsterdam and I have to do an analysis in R. I
> spoke
> > > > to my professor in Amsterdam and my supervisor's here in Boston. But
> they
> > > > are to busy to help. I informed them from the start that I am not
> > > familiar
> > > > with R(Rstudio) and they told me that I would receive guidance. So
> since
> > > > they can not help me, I decided to share my problem online. (It is a
> CVS
> > > > file imported into R)
> > >
> > > Rachel,
> > >
> > >I find it interesting that you're put in such a difficult position.
> I've
> > > not followed this thread from the start so my comments might be
> redundant
> > > or
> > > inappropriate.
> > >
> > >If you can, describe the problem. That is, what are you being asked
> to
> > > find and what are the available data? This information helps us to
> guide
> > > you
> > > to learning the mechanics for accomplishing your task with R.
> > >
> > > Regards,
> > >
> > > Rich
> > >
> > > __
> > > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > > 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.
> > >
> >
> > [[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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.
> Osobní údaje: Informace o zpracování a ochraně osobních údajů obchodních
> partnerů PRECHEZA a.s. jsou zveřejněny na:
> https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information
> about processing and protection of business partner’s personal data are
> available on website:
> https://www.precheza.cz/en/personal-data-protection-principles/
> Důvěrnost: Tento e-mail a jakékoliv k němu připojené dokumenty jsou
> důvěrné a podléhají tomuto právně závaznému prohláąení o vyloučení
> odpovědnosti: https://www.precheza.cz/01-dovetek/ | This email and any
> documents attached to it may be confidential and are subject to the legally
> binding disclaimer: https://www.precheza.cz/en/01-disclaimer/
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>


-- 
OpenPG

Re: [R] Reading an excel file

2019-01-10 Thread Hasan Diwan
 https://cran.r-project.org/web/packages/xlsx/xlsx.pdf

You'll need the JDK (>= 1.6) -- H

On Thu, 10 Jan 2019 at 13:40, Bernard Comcast 
wrote:

> What is the best way to read in data of any type from an Excel 2016 .xlsx
> file?
>
> Thanks
>
> Bernard
> Sent from my iPhone so please excuse the spelling!"
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>


-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] (no subject)

2019-02-02 Thread Hasan Diwan
Look at the rootSolve package[1] for what you need. Hope it helps... -- H

On Sat, 2 Feb 2019 at 06:46, malika yassa via R-help 
wrote:

> Please, can you help me I have a equation to solve by newton method but I
> can not do it
> for example
>
> f<-function(x) {
>
>
> 2+X2-X3=0}
> this equation have un solution in [1,2]
> is there a function in R for solve it or i have to programme it
>
>
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>


-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] (no subject)

2019-02-10 Thread Hasan Diwan
This is spam, right? -- H

On Sun, 10 Feb 2019 at 12:36, Diego Miro  wrote:

> 4 xxx ff
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>


-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Problem with assignment 1 part 1

2014-08-10 Thread Hasan Diwan
We can try, but we're not going to be able to do much without the code
being pasted in the email. -- H


On 10 August 2014 19:08, michelle maurin  wrote:

> I think my code is very close I can seem to be able to debug it Might be
> something very simple I know the problem is on the last 3 lines of code can
> you please help?
> Thanks
> Michelle
> __
> 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.
>
>


-- 
Sent from my mobile device
Envoyé de mon portable

[[alternative HTML version deleted]]

__
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] see rcurl contents before they're sent?

2014-11-20 Thread Hasan Diwan
RCurl has a verbose switch, which may be set as follows:

response <- postForm(getUpdateURL(),.opts = list(postfields = '{"delete":
{"query":"*:*"}}',httpheader = c('Content-Type' = 'application/json',Accept
= 'application/json', *verbose = TRUE*) # emphasis mine

On 20 November 2014 16:16, Mark Miller  wrote:

> I am trying to use the R / solr integration from
> https://github.com/datadolphyn/R/blob/master/r_solr_integration.R
>
> I have the query function working, but I'm having trouble with the post
> functions, which uses rcurl.
>
> Is it possible to see the string that rcurl is going to send to a webserver
> (instead of, or in addition to send it to the server?)
>
> thanks,
> Mark
>
> [[alternative HTML version deleted]]
>
> __
> 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.
>



-- 
OpenPGP: https://hasan.d8u.us/gpg.key
Sent from my mobile device
Envoyé de mon portable

[[alternative HTML version deleted]]

__
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] How to download this data

2015-08-25 Thread Hasan Diwan
If there's no api available, I would use selenium to grab what I need and
pipe it to R. Let me know if you need further assistance. Cheers! -- H
On Aug 25, 2015 11:12 AM, "Christofer Bogaso" 
wrote:

> Hi,
>
> I would like to download data from below page directly onto R.
>
>
> http://www.nseindia.com/live_market/dynaContent/live_watch/equities_stock_watch.htm
>
> Could you please assist me how can I do that programmatically.
>
> Thanks for your time.
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Distance in miles btw Zipcodes

2015-09-18 Thread Hasan Diwan
Farnoosh,
Please add your data by doing a dput(sample(data)) and we'll be able to
help you further. -- H

On 17 September 2015 at 15:36, Farnoosh Sheikhi via R-help <
r-help@r-project.org> wrote:

>  Hello,
> I'm trying to get the distances between two Zipcode variables, but for
> some reason I get this error:
> "matching was not perfect, returning what was found.Error: no such index
> at level 1"
> Here is my code:
>
> library(ggmap)mapdist(data$Zip.A, data$Zip.B, mode = "driving")
> The Zip codes are all in 5 digits format.I really appreciate any help or
> suggestion.Thanks.
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.




-- 
OpenPGP: https://hasan.d8u.us/gpg.key
Sent from my mobile device
Envoyé de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] QuantMod and XML

2015-11-07 Thread Hasan Diwan
Bob,

On 7 November 2015 at 15:27, Robert Sherry  wrote:

>
> I am trying to use the package quantmod to get option quotes in R.
> Therefore, I executed the following two commands:
> library ("quantmod" )
> getOptionChain("AAPL")
> The first one worked but the second one produced the following error
> message:
> Error in getOptionChain.yahoo(Symbols = "AAPL") :
> package:“XML”cannot be loaded.
> Therefore, I am thinking I need to install the package XML. To do so, I
> executed the following command:
> install.packages( "XML" )
> However, that command failed because it could not find the package XML.
> The following URL:
> https://cran.r-project.org/web/packages/XML/XML.pdf
> indicates to me that it does exist.
>

It also shows its webpage to be at http://www.omegahat.org/RSXML. On the
root of the site -- http://www.omegahat.org -- the installation command is
given as install.packages(packageName, repos = "http://www.omegahat.org/R";).
So perhaps, you should try install.packages("XML", repos = "
http://www.omegahat.org/R";) or install.packages("RSXML", repos = "
http://www.omegahat.org/R";) as one of those two should get you what you
want. Hope that helped... -- H

>
> I am hoping somebody can tell me what I am doing wrong.
>
> Thanks
> Bob
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.




-- 
OpenPGP: https://hasan.d8u.us/gpg.key
Sent from my mobile device
Envoyé de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] R-help mailing list activity / R-not-help?

2016-01-25 Thread Hasan Diwan
There exists a fine line between being unintentionally rude, but helpful
and purposely putting someone down. -- H

On 25 January 2016 at 12:07, Duncan Murdoch 
wrote:

> On 25/01/2016 2:45 PM, Oliver Keyes wrote:
>
>> I disagree, and would argue that fails to take a systemic view of this
>> kind of behaviour.
>>
>> If individual commentators are acerbic and are only privately
>> reprimanded, from the perspective of everyone else it looks like the
>> acerbic reply was A-OK. Someone said something unnecessarily hostile
>> and the response was...nada. That creates an environment where there
>> are no clear examples of what crosses a line and no clear expectation
>> that moderation is even a thing that happens. Indeed, I was shocked to
>> discover this list _was_ moderated precisely because all I see is
>> people being mean and nothing much else happening.
>>
>
> Why would you bother to read it if that's all you see?  I think there are
> examples of posts here which are not at all helpful, and others which are
> rude, but the majority are actually helpful (even some of the rude ones).
>
> Duncan Murdoch
>
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>



-- 
OpenPGP: https://hasan.d8u.us/gpg.key
Sent from my mobile device
Envoyé de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] R-help mailing list activity / R-not-help?

2016-01-25 Thread Hasan Diwan
On 25 January 2016 at 13:13, Duncan Murdoch 
wrote:

> On 25/01/2016 3:33 PM, Hasan Diwan wrote:
>
>> There exists a fine line between being unintentionally rude, but helpful
>> and purposely putting someone down. -- H
>>
>
> I'm afraid I don't think your point is relevant.  I didn't claim all the
> people who were rude did it unintentionally.  However,  I don't know anyone
> on the list who is always rude and never helpful. Oliver claimed almost
> everyone is like that.


> I actually agree with a weaker version of John's proposal (which I cut out
> of my reply to Oliver).  I can imagine a public reprimand from one of the
> moderators would be appropriate.  It would never be appropriate from
> general list members; that's what leads to flame wars.
>
> I'm not a moderator, so I would not publicly "remind the poster to reply
> in a more moderate tone", and neither should you (unless you're a
> moderator).  It would be much better if one or both of us posted a more
> helpful response when we saw a rude, unhelpful one.


I'm not one to attack others in general, and have developed thick skin, so
a lot of what others find rude, I will ignore and get on with things. That
said, if someone does tell me that e.g. "Hasan is being offensive because
of $x, $y or $z", I'll apologise and get on with my life. Most of the time,
when people find me offensive, it's because I treat others how I wish to be
treated and the rhetoric just doesn't offend me. -- H

>
>
> Duncan Murdoch
>
>
>
>
>> On 25 January 2016 at 12:07, Duncan Murdoch 
>> wrote:
>>
>> > On 25/01/2016 2:45 PM, Oliver Keyes wrote:
>> >
>> >> I disagree, and would argue that fails to take a systemic view of this
>> >> kind of behaviour.
>> >>
>> >> If individual commentators are acerbic and are only privately
>> >> reprimanded, from the perspective of everyone else it looks like the
>> >> acerbic reply was A-OK. Someone said something unnecessarily hostile
>> >> and the response was...nada. That creates an environment where there
>> >> are no clear examples of what crosses a line and no clear expectation
>> >> that moderation is even a thing that happens. Indeed, I was shocked to
>> >> discover this list _was_ moderated precisely because all I see is
>> >> people being mean and nothing much else happening.
>> >>
>> >
>> > Why would you bother to read it if that's all you see?  I think there
>> are
>> > examples of posts here which are not at all helpful, and others which
>> are
>> > rude, but the majority are actually helpful (even some of the rude
>> ones).
>> >
>> > Duncan Murdoch
>> >
>> >
>> > __
>> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> > 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.
>> >
>>
>>
>>
>>
>


-- 
OpenPGP: https://hasan.d8u.us/gpg.key
Sent from my mobile device
Envoyé de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] package ‘xlsx’ is not available (for R version 3.2.3)

2016-02-13 Thread Hasan Diwan
install.packages('xlsx', type='source', repos='http://cran.rstudio.com')
should sort you. -- H

On 13 February 2016 at 09:42, papa legba  wrote:

> Hi,
> Does anyone have any idea how to work around this ?
> package ‘xlsx’ is not available (for R version 3.2.3)
>
> To make xlsx work for 3.2.3 ?
>
> Thanks
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.




-- 
OpenPGP: http://hasan.d8u.us/gpg.asc
Sent from my mobile device
Envoyé de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] read_csv not recognized

2021-03-08 Thread Hasan Diwan
function (file, col_names = TRUE, col_types = NULL, locale =
default_locale(),
na = c("", "NA"), quoted_na = TRUE, quote = "\"", comment = "",
trim_ws = TRUE, skip = 0, n_max = Inf, guess_max = min(1000,
n_max), progress = show_progress(), skip_empty_rows = TRUE)
{
tokenizer <- tokenizer_csv(na = na, quoted_na = quoted_na,
quote = quote, comment = comment, trim_ws = trim_ws,
skip_empty_rows = skip_empty_rows)
read_delimited(file, tokenizer, col_names = col_names, col_types =
col_types,
locale = locale, skip = skip, skip_empty_rows = skip_empty_rows,
comment = comment, n_max = n_max, guess_max = guess_max,
progress = progress)
}

Is the source from my copy of tidyverse. Not too involved to copy/paste
into one's .Rprofile or type into the console session. -- H

On Mon, 8 Mar 2021 at 12:53, Carlos Gonzalez  wrote:

> Hi everybody,
>
> I've load tidyverse:
>
> library(tidyverse)
>
> and then try to use the function read_csv() but  it didn't recognize it.
>
> Thanks!
>
> --
> Saludos / Regards
>
> Carlos A. Gonzalez
> Mobile +598 94 234 653
> cag...@gmail.com
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>


-- 
OpenPGP: https://hasan.d8u.us/openpgp.asc
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Beginner problem - using mod function to print odd numbers

2021-06-04 Thread Hasan Diwan
unlist(sapply(seq(1,100), function(n) { if(n %% 2) n })) yields:

 [1]  1  3  5  7  9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45
47 49
[26] 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95
97 99

As for why your solution isn't working, if you'd like me to take a closer
look and figure out exactly what you're doing wrong, let me know? -- H

On Fri, 4 Jun 2021 at 23:09, nelpar  wrote:

>
> I don't understand. --
>
> 7%%2=1
> 9%%2=1
> 11%%2=1
>
> What aren't these numbers printing ?
>
>
> num<-0
> for (i in 1:100){
>   num<-num+i
> if (num%%2 != 0)
>   print(num)
> }
>
>
> [1] 1
> [1] 3
> [1] 15
> [1] 21
> [1] 45
> [1] 55
> [1] 91
> [1] 105
> [1] 153
> [1] 171
> [1] 231
> [1] 253
> [1] 325
> [1] 351
> [1] 435
> [1] 465
> [1] 561
> [1] 595
> [1] 703
> [1] 741
> [1] 861
> [1] 903
> [1] 1035
> [1] 1081
> [1] 1225
> [1] 1275
> [1] 1431
> [1] 1485
> [1] 1653
> [1] 1711
> [1] 1891
> [1] 1953
> [1] 2145
> [1] 2211
> [1] 2415
> [1] 2485
> [1] 2701
> [1] 2775
> [1] 3003
> [1] 3081
> [1] 3321
> [1] 3403
> [1] 3655
> [1] 3741
> [1] 4005
> [1] 4095
> [1] 4371
> [1] 4465
> [1] 4753
> [1] 4851
>
>
>
> --
> Sent from: https://r.789695.n4.nabble.com/R-help-f789696.html
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>


-- 
OpenPGP: https://hasan.d8u.us/openpgp.asc
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] RMariaDB returns a query without microseconds

2021-07-26 Thread Hasan Diwan
Afternoon,

> https://mariadb.com/kb/en/microseconds-in-mariadb/ -- seems you're
> hitting a MariaDB (or perhaps, inherited from MySQL) limitation here. -- H
>
-- 
OpenPGP: https://hasan.d8u.us/openpgp.asc
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] fortune nomination WAS: Re: How long does it take to learn the R programming language?

2022-09-28 Thread Hasan Diwan
A minute to learn, a lifetime to master? -- H

On Wed, 28 Sept 2022 at 11:03, Berry, Charles 
wrote:

> Aha!
> CCB
>
> > On Sep 27, 2022, at 6:08 PM, Rolf Turner 
> wrote:
> >
> >
> > On Mon, 26 Sep 2022 11:14:57 +0800
> > Turritopsis Dohrnii Teo En Ming  wrote:
> >
> >> Subject: How long does it take to learn the R programming language?
> >>
> >> Good day from Singapore,
> >>
> >> How long does it take to learn the R programming language?
> >
> > How long is a piece of string? :-)
> >
> > cheers,
> >
> > Rolf Turner
> >
> > --
> > Honorary Research Fellow
> > Department of Statistics
> > University of Auckland
> > Phone: +64-9-373-7599 ext. 88276
> >
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>


-- 
OpenPGP: https://hasan.d8u.us/openpgp.asc
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] (no subject)

2023-01-26 Thread Hasan Diwan
Upananda.
On Mon, 16 Jan 2023 at 12:55, Upananda Pani  wrote:

> Greetings! I would like to know how to create the lag variable for my data.
>

Kindly provide a link to your data, on a publicly accessible page or a
means to generate fake data that illustrates your issue. -- H

-- 
OpenPGP: https://hasan.d8u.us/openpgp.asc
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Plot R graphs in aws

2023-04-23 Thread Hasan Diwan
Alternatively, you can put R-studio server on AWS by going to
https://www.louisaslett.com/RStudio_AMI/. -- H

On Thu, 20 Apr 2023 at 04:58, Duncan Murdoch 
wrote:

> On 20/04/2023 7:43 a.m., Naresh Gurbuxani wrote:
> > In my Amazon Web Services (AWS) account, I use R via emacs launched from
> terminal. While R computations work well, viewing graphs is inconvenient.
> I am not able to use screen device.  I can send graphs to a png or pdf
> file, then open the file.
> >
> > I would like a setup where code is run in one window while graphs are
> displayed in another window.  Has anyone created a setup like this?
>
> You don't say which OS's you are running, but if you can run an X server
> on your local machine, the remote R process should be able to display
> graphs there (as long as it is running on a Unix-alike).
>
> Duncan Murdoch
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>


-- 
OpenPGP: https://hasan.d8u.us/openpgp.asc
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] R 3.4.4 is released

2019-05-10 Thread Hasan Diwan
Congrats to the team! -- H

On Thu, 18 Apr 2019 at 08:35, Michael Dewey  wrote:

> Dear Stephen
>
> Questions about RStudio ae best asked in their help forums but I would
> definitely install the latest version of R and RStudio and do
> update.packages before asking
>
> Michael
>
> On 18/04/2019 13:19, Stephen Muldoon wrote:
> > Hi,
> >
> > I am new to R studio. If my R studio continually asks to restart for new
> packages to run, should I remove R studio and reinstall this latest version?
> >
> > Thanks,
> > Stephen
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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.
> >
> > ---
> > This email has been checked for viruses by AVG.
> > https://www.avg.com
> >
> >
>
> --
> Michael
> http://www.dewey.myzen.co.uk/home.html
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>


-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Calling R code from Javascript

2019-05-24 Thread Hasan Diwan
Sunanda,
I'd suggest you expose a model and methods to the web using shiny or
something. After which, you just need to use jquery to call the HTTP
endpoint. If you need further assistance, please email me off list and I'll
provide. -- H

On Fri, 24 May 2019 at 18:05, Sunanda Iyengar via R-help <
r-help@r-project.org> wrote:

> Hello,
> Came across this e-mail when considering plumber to use R Gui.I am very
> new to this and i am not sure how to use plumber to connect a javascrpt
> code to run R. I have a chunk of R code which does some number crunching
> work which is very neat. I want this to run from a browser API call using
> plumber within javascript. Please let me if it is possible. If you have a
> javascript example I would be very thankful for the share.
> If there are other ways to run R code from javascript, pl let me know.
>
> Regards,Sunanda
>
>-
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>


-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] R 3.6.1 is released

2019-07-05 Thread Hasan Diwan
Congrats to the lot of you/us! -- H
-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] R 3.6.2 is released

2019-12-12 Thread Hasan Diwan
Congrats on the release! -- H

On Thu, 12 Dec 2019 at 06:20, Spencer Graves <
spencer.gra...@effectivedefense.org> wrote:

> Ditto.  Spencer Graves
>
>
> On 2019-12-12 07:54, Rich Shepard wrote:
> > On Thu, 12 Dec 2019, Peter Dalgaard via R-help wrote:
> >
> >> The build system rolled up R-3.6.2.tar.gz (codename "Dark and Stormy
> >> Night") this morning.
> >
> > Peter,
> >
> > My thanks to all of you on the R core team.
> >
> > Regards,
> >
> > Rich
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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 -- To UNSUBSCRIBE and more, see
> 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.
>


-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] CRAN UC Berkeley link

2020-01-26 Thread Hasan Diwan
https://cran.r-project.org/mirmon_report.html
Let them know what's going on.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] how to read a database in R?

2020-01-31 Thread Hasan Diwan
Ms Marija,
Would you happen to know which program created it? If not, you can try the
Unix file command, if you have access to that. -- H

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] COVID-19 datasets...

2020-05-04 Thread Hasan Diwan
On Mon, 4 May 2020 at 11:32, Bernard McGarvey 
wrote:

> Just curious does anyone know of a website that has data available in a
> format that R can download and analyze?
>

https://hd1-units.herokuapp.com/covid has a days parameter one can adjust
to go back in time and a suffix parameter to obtain json, yml, or csv. -- H

-- 
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] Off-topic? Linux laptop for R

2013-08-11 Thread Hasan Diwan
Any laptop that performs well with Linux will perform acceptably with R and
vice versa. -- H


On 11 August 2013 11:03, Mitchell Maltenfort  wrote:

> Can anyone recommend a laptop that performs well running R under Linux?
> Thanks.
>
> [[alternative HTML version deleted]]
>
> __
> 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.
>



-- 
Sent from my mobile device
Envoyé de mon portable

[[alternative HTML version deleted]]

__
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 wrong in my codes???

2012-12-24 Thread Hasan Diwan
Eliza,
On 24 December 2012 08:34, eliza botto  wrote:

>
> Dear R family,i am trying to plot and save, simultaneously,  about 1000.
> the name of each plot is contained in "names" file. when i run this loop, i
> get an error.
> "Error in plot.new() :   Unable to open file
> 'C:/R/SAVEHERE/myplot_Tak.jpg' for writing". could you please correct the
> mistake in the loop?
>

Is your filename too long for the filesystem? Does the "/R/SAVEHERE"
directory exist? -- H
-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] Converting Date to Unix Time

2013-02-01 Thread Hasan Diwan
Mr Isella,

On 1 February 2013 05:37, Lorenzo Isella  wrote:
> How can I convert that into Unix time?

format.POSIXct(dateCol, '%s'); -- H
-- 
Sent from my mobile device
Envoyait de mon portable

__
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] Fwd: some questions about ARIMA and FARIMA

2013-03-12 Thread Hasan Diwan
Sara,

On 11 March 2013 18:26, cyl123 <505186...@qq.com> wrote:
>  I have some quesions about about ARIMA and FARIMA:

Looks like they're all answered in the PDF for fArma[1].
-- 
Sent from my mobile device
Envoyait de mon portable
1. http://cran.r-project.org/web/packages/fArma/fArma.pdf

__
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] how to change "`Year_Month)201103`" into "Year_Month)201103" using R?

2013-03-14 Thread Hasan Diwan
On 14 March 2013 01:56, Marc Girondot  wrote:
>> cat(gsub("`", "", x))

might want to add fixed=TRUE to the gsub line.
-- 
Sent from my mobile device
Envoyait de mon portable

__
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] Spider Plot

2013-04-19 Thread Hasan Diwan
install.packages('psych', repos='http://cran.rstudio.com', dep=TRUE)
require(psych)
spider(y=1,x=2:9,data=Thurstone)



On 19 April 2013 22:29, XINLI LI  wrote:

> Does any one have a sample code for a Spider Plot as attached?
>
> Thanks,
>
> Xing
>
> __
> 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.
>
>


-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] Manhattan Plot

2013-04-27 Thread Hasan Diwan
Just because it is possible to make a plot, doesn't mean it's a good idea.
It would depend on what you're trying to show. -- H


On 27 April 2013 17:21, lw...@yahoo.com  wrote:

> Hi, Tenfei,  I have two group of data composed of gene mutation and
> deletion on specific sites. Will it be possible for me to use the Manhattan
> Plot for comparison?  Thank you for you attention!  Li-Wu Guo, Ph.D.
>
>
> Sent from Windows Mail
> [[alternative HTML version deleted]]
>
> __
> 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.
>



-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] KalmanForecast (stats)

2013-07-01 Thread Hasan Diwan
On 1 July 2013 19:24, Giovanni Petris  wrote:
> Could you send me a simple example of KalmanForecast (with input data) that I 
> can run and can see how it works exactly?

There's an explanation of the Kalman Filter available at
http://www.swarthmore.edu/NatSci/echeeve1/Ref/Kalman/ScalarKalman.html
-- I've summarised it below:
The kalman filter is used to reduce the noise in an indirectly
measured signal, s, approximated by the formula -- x[t] = a*x[t-1] +
b*u[t], to which a random amount of white noise is added, making the
equation x[t] = a*x[t-1]+b*u[t] + w[t]. The white noise varies with
time, hence it's a series. Each measure of x[t] brings you closer to
the actual signal. I hope this helps... -- H
-- 
Sent from my mobile device
Envoyé de mon portable

__
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] add lowess predicted line to scatter plot

2012-09-24 Thread Hasan Diwan
Instead of attachments, put the out

On 24 September 2012 01:58, Maximilian Lklweryc wrote:

> Hi,
> I have a scatter plot of the variables GNI and Lifeexp (Gross National
> Income and Life Expectancy, both metric). So I plotted them and I want to
> add a regression line and a lowess line. I use lowess and not loess because
> I have missing values. My code:
> plot(GNI,Lifeexp)
> abline(lm(Lifeexp~GNI), col="red")
> y.loess<-loess(Lifeexp~GNI,na.
> action = na.exclude)
> y.predict<-predict(y.loess)
> lines(GNI,y.predict)
> But when I do this (I get no error messages) the plot looks strange. The
> lowess line is not a blue smoothy line, but it looks  really strange, I
> attached a png screenshot.
>
> Where is my mistake? Thanks a lot.
>
> [[alternative HTML version deleted]]
>
> __
> 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.
>



-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] Mac Text editors

2012-09-27 Thread Hasan Diwan
On 27 September 2012 09:26, peter dalgaard  wrote:

> (I gather that .emacs functionality ends up in
> ~/Library/Preferences/Aquamacs\ Emacs/* . You're not really expected to
> bypass the menus, though.)
>

~/.emacs, same place as on Linux.
-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] Class for time series

2012-10-04 Thread Hasan Diwan
Mr. Emmanuel,

On 4 October 2012 02:43, Poizot Emmanuel  wrote:

> Dear all,
>
> I have a time serie dataset such as the following with data acquired every
> 15 minutes:
>
> DateHeure Profondeur Température Salinité Turbidité Chloration
> 1 2012-07-06 08:47:22 -0.144  22.4690.011 0.000  0
> 2 2012-07-06 09:02:21 -0.147  22.4760.011 0.000  0
> 3 2012-07-06 09:17:21 -0.139  22.4980.011 19.323  0
> 4 2012-07-06 09:32:21 -0.136  22.5400.011 19.343  0
> 5 2012-07-06 09:47:21 -0.141  22.5100.011 19.321  0
> 6 2012-07-06 10:02:21 -0.139  22.3720.011 19.280  0
>
> I wonder what is the best class to use to manage such time series


Use xts whenever dealing with timeseries, to construct:
xts(data.in[,-1:2], order.by=as.POSIXct(paste(data.in[,1:2])))

Also, when you post help requests, use dput on your data set. I'm assuming
it's a data.frame, but I'd be able to actually test my code if there were
dput output in your question. -- H
-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] Broken Links on http://www.r-project.org

2012-10-04 Thread Hasan Diwan
The R Graphics Gallery has moved to http://gallery.r-enthusiasts.com/ and
there's another R Graphics Manual at http://rgm2.lab.nig.ac.jp/RGM2 -- H

On 26 September 2012 04:56, Viechtbauer Wolfgang (STAT) <
wolfgang.viechtba...@maastrichtuniversity.nl> wrote:

> I was not sure who I should contact about this, so I am posting this here.
>
> There are a few broken links on the R website.
>
> 1) http://www.r-project.org/search.html -> link to the Nabble R Forum. I
> belive the correct/new URL should be: http://r.789695.n4.nabble.com/
>
> 2) http://www.r-project.org/other-docs.html -> link to "Auswertung
> ökologischer Daten". Not sure if there is a new URL.
>
> 3) http://www.r-project.org/other-projects.html -> link to Jim Lindsey's
> R page. I believe the correct/new URL should be:
> http://www.commanster.eu/rcode.html
>
> Best,
> Wolfgang
>
> --
> Wolfgang Viechtbauer, Ph.D., Statistician
> Department of Psychiatry and Psychology
> School for Mental Health and Neuroscience
> Faculty of Health, Medicine, and Life Sciences
> Maastricht University, P.O. Box 616 (VIJV1)
> 6200 MD Maastricht, The Netherlands
> +31 (43) 388-4170 | http://www.wvbauer.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.
>



-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] Update CSV file content

2012-10-08 Thread Hasan Diwan
Mr Akkara,

On 8 October 2012 05:20, Rantony  wrote:
>
> Here i have a csv file, it contain like this
>
> NAME   UPDATED
> -   --
> ABCINDIA
> XYZ UK
>
> My requirement what is, i need to change the value inside the csv file
> (instead of INDIA i need to make it USA).
>
> NAME   UPDATED
> -   --
> ABCUSA
> XYZ UK
>
>
How about:

> read.data(csv-file-name, header=TRUE, stringsAsFactors=FALSE) ->
nameAndUpdated
> nameAndUpdated[nameAndUpdated[,2] == 'USA',2] <- 'INDIA'
> write.csv(nameAndUpdated, csv-file-name, header=TRUE)

-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] Convert COLON separated format

2012-10-08 Thread Hasan Diwan
Mr Silverman,

On 9 October 2012 00:56, Noah Silverman  wrote:

> I have a bunch of data sets that were created for the libsvm tool.  They
> are in "colon separated sparse format".
> Is there a simple way to do this?
>

Use read.table with a sep of ':' and let me know how you get on. -- H
-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] gumbel distribution

2014-05-14 Thread Hasan Diwan
Eliza,
See the gamlss package's Gumbel distribution[1], where you will find your
solution. OTOH, why does GAMLSS duplicate what's built-in to R? -- H
1. http://artax.karlin.mff.cuni.cz/r-help/library/gamlss.dist/html/GU.html


On 14 May 2014 09:16,  wrote:

> The Weibull and Gumbel distributions are NOT the same.
>
>
>
> Frede Aakmann Tøgersen 
> Sent by: r-help-boun...@r-project.org
> 05/14/2014 02:01 AM
>
> To
> eliza botto , "r-help@r-project.org"
> ,
> cc
>
> Subject
> Re: [R] gumbel distribution
>
>
>
>
>
>
> Don't know if I understand your last comment but I surely don't think that
> the Weibull and Gumbel distributions are the same. See their density
> function on e.g. Wikipedia.
>
> Yours sincerely / Med venlig hilsen
>
>
> Frede Aakmann Tøgersen
> Specialist, M.Sc., Ph.D.
> Plant Performance & Modeling
>
> Technology & Service Solutions
> T +45 9730 5135
> M +45 2547 6050
> fr...@vestas.com
> http://www.vestas.com
>
> Company reg. name: Vestas Wind Systems A/S
> This e-mail is subject to our e-mail disclaimer statement.
> Please refer to www.vestas.com/legal/notice<
> http://www.vestas.com/legal/notice>
> If you have received this e-mail in error please contact the sender.
>
> From: eliza botto [mailto:eliza_bo...@hotmail.com]
> Sent: 13. maj 2014 21:20
> To: Frede Aakmann Tøgersen; r-help@r-project.org
> Subject: RE: [R] gumbel distribution
>
> Thankyou very much Frede. It wasn't any home I am just trying to put my
> grip on distribution. Believe it or not, I came to know for the first time
> that weibull and gumbel distributions are same. :(
>
> Eliza
>
> > From: fr...@vestas.com
> > To: eliza_bo...@hotmail.com;
> r-help@r-project.org
> > Date: Tue, 13 May 2014 20:08:20 +0200
> > Subject: RE: [R] gumbel distribution
> >
> > Is this a home work problem?
> >
> > See
> >
> > Weibull package:stats R Documentation
> >
> > The Weibull Distribution
> >
> > Description:
> >
> > Density, distribution function, quantile function and random
> > generation for the Weibull distribution with parameters 'shape'
> > and 'scale'.
> >
> > Usage:
> >
> > dweibull(x, shape, scale = 1, log = FALSE)
> > pweibull(q, shape, scale = 1, lower.tail = TRUE, log.p = FALSE)
> > qweibull(p, shape, scale = 1, lower.tail = TRUE, log.p = FALSE)
> > rweibull(n, shape, scale = 1)
> >
> >
> > Yours sincerely / Med venlig hilsen
> >
> >
> > Frede Aakmann Tøgersen
> > Specialist, M.Sc., Ph.D.
> > Plant Performance & Modeling
> >
> > Technology & Service Solutions
> > T +45 9730 5135
> > M +45 2547 6050
> > fr...@vestas.com
> > http://www.vestas.com
> >
> > Company reg. name: Vestas Wind Systems A/S
> > This e-mail is subject to our e-mail disclaimer statement.
> > Please refer to www.vestas.com/legal/notice<
> http://www.vestas.com/legal/notice>
> > If you have received this e-mail in error please contact the sender.
> >
> >
> > > -Original Message-
> > > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org]
> > > On Behalf Of eliza botto
> > > Sent: 13. maj 2014 19:57
> > > To: r-help@r-project.org
> > > Subject: [R] gumbel distribution
> > >
> > > Dear useRs,
> > > I need some examples of gumbel probability plots in R. i'll be
> extremely
> > > grateful if you could share the codes of a working example.
> > > Eliza
> > >
> > >
> > > [[alternative HTML version deleted]]
> > >
> > > __
> > > 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.
>
>  [[alternative HTML version deleted]]
>
> __
> 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.
>
>
> [[alternative HTML version deleted]]
>
>
> __
> 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.
>
>


-- 
Sent from my mobile device
Envoyé de mon portable

[[alternative HTML version deleted]]

__
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] how to remove outliers

2014-07-14 Thread Hasan Diwan
Marta,
To remove a row from your data frame, use:

value <- 14478.4
time <- time[-time[$TimeDiff] == value,]

I hope that helps... If not, do push back. -- H


On 14 July 2014 09:17, Marta valdes lopez  wrote:

> Hi!
>
> I did this test and I got this outlier that i would like to remove the
> whole row in my database; anyone knows how i can remove it?
>
>  chisq.out.test(time$TimeDiff)
> chi-squared test for outlier
> data:  time$TimeDiff
> X-squared = 73260.07, p-value < 2.2e-16
> alternative hypothesis: highest value 14478.4 is an outlier
>
> Thank you!!
>
> [[alternative HTML version deleted]]
>
> __
> 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.
>



-- 
Sent from my mobile device
Envoyé de mon portable

[[alternative HTML version deleted]]

__
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] Java Exception error while reading large data in R from DB using RJDBC.

2012-11-01 Thread Hasan Diwan
Sir,

On 30 October 2012 04:32, aajit75  wrote:
>
> Please suggest where  am i going wrong or alternate option to solve such
> issues  while reading large DB table.
>

You might consider setting the fetch size. I haven't used RJDBC in a few
months, but hopefully, the hints on
http://www.rforge.net/doc/packages/RJDBC/html/JDBCResult-methods.html point
you in the right direction? If not, email me off-list and I'll try to come
up with some sample code to help you. -- H

[[alternative HTML version deleted]]

__
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] Java Exception error while reading large data in R from DB using RJDBC.

2012-11-01 Thread Hasan Diwan
On 1 November 2012 11:47, Hasan Diwan  wrote:

> Sir,
>
> On 30 October 2012 04:32, aajit75  wrote:
>>
>> Please suggest where  am i going wrong or alternate option to solve such
>> issues  while reading large DB table.
>>
>
> You might consider setting the fetch size. I haven't used RJDBC in a few
> months, but hopefully, the hints on
> http://www.rforge.net/doc/packages/RJDBC/html/JDBCResult-methods.html point
> you in the right direction? If not, email me off-list and I'll try to come
> up with some sample code to help you. -- H
>

Indeed... the magic incantation seems to be:
results <- dbSendQuery(connection, sqlStatement)
partial.result.set <- fetch(results, number.to.fetch.in.one.go)
partial.result.set should be a data.frame with the number you've asked for.
It may take some tweaking to get it correct, but this is how to set the
fetch size in RJDBC. -- H


-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] map.market - font customisation

2011-05-11 Thread Hasan Diwan
How would I go about customising the font -- colour and size -- of the
font used in portfolio's map.market function? The existing fonts are a
bit small, when embedded into a PDF using Sweave generated latex. Many
thanks!

-- 
Sent from my mobile device
Envoyait de mon telephone mobil

__
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] strucchange package Linux help

2011-05-18 Thread Hasan Diwan
When I run the code below on Macintosh and Windows, the plot comes out
fine. However, on Linux, the png generated is invalid from R console,
and loading strucchange crashes rkward. Is this a known issue on Linux
and, if so, is there a workaround? Many thanks!
require(strucchange)
data("RealInt")
bp.ri <- breakpoints(RealInt~1, h=15)
summary(bp.ri)
fac.ri <- breakfactor(bp.ri, breaks = 3, label='seg')
fm.ri <- lm(RealInt~0 + fac.ri)
summary(fm.ri)
vcov.ri <- function(x,...) kernHAC (x, kernel = 'Quadratic Spectral',
prewhite = 1, approx = 'AR(1)', ...)
coef(bp.ri, breaks <- 3)
sapply(vcov(bp.ri, breaks = 3, vcov=vcov.ri), sqrt)
confint(bp.ri, breaks = 3, vcov=vcov.ri)

png('SCC2.png')
plot(RealInt)
lines(as.vector(time(RealInt)), fitted(fm.ri), col=4)
lines(confint(bp.ri, breaks = 3, vcov=vcov.ri))
dev.off()
print(paste('Plot in SCC2.png in', getwd()))

-- 
Sent from my mobile device
Envoyait de mon telephone mobil

__
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] Rjdbc dbGetquery execution error

2011-02-16 Thread Hasan Diwan
Rjdbc consistently gives me an execution error with postgresql 9.0s JDBC4
driver. It's probably something trivial so am including my code below:

library("RJDBC")
param <- 249
param2 <- 188129
postgres <- JDBC("org.postgresql.Driver",
".m2/repository/postgresql/postgresql/9.0-801.jdbc4/postgresql-9.0-801.jdbc4.jar")
con <- dbConnect(postgres, "jdbc:postgresql://hq.d8u.us/erm", user =
"hdiwan")
sql <- "select id, startdate, value from dists where profileid = ?"
data1 <- dbGetQuery(conn, sql, param) # Dies here, no matter what the query,
tried with "select 1+1" as well as the one above
data2 <- dbGetQuery(conn, sql, param2)
cor(data1$V3, data2$V3)

[[alternative HTML version deleted]]

__
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] RCurl HTTP Post ?

2011-02-17 Thread Hasan Diwan
According to [1] and [2], using RCurl to post a form with basic
authentication is done using the postForm method. I'm trying to post
generated interpolation data from R onto an HTTP form. The call I'm using is
page <- postForm('http://our.server.com/dbInt/new', opts =
curlOptions=(userpwd="test:test", verbose=T), profileid = "-1",
value="1.801", type="history"). The page instance shows the HTTP response
500 screen and I get a nullpointerexception in the server logs. The line it
points to is dealing with getting an integer out of "profileid". Help?
Many thanks in advance...
-- 
Hasan Diwan
Developer
Economic Risk Management LLC
1. http://cran.r-project.org/web/packages/RCurl/RCurl.pdf
2. http://www.omegahat.org/RCurl/FAQ.html

[[alternative HTML version deleted]]

__
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] RCurl HTTP Post ?

2011-02-22 Thread Hasan Diwan
On 19 February 2011 07:24, Duncan Temple Lang 
wrote:

Do you mean that the R variable page gives information about the request
error
and contains the 500 error code? Not sure what you mean by "screen"
here.


Yes that's exactly what I mean


Client-server interactions are hard to debug as the problems can be on
either
side or in the communication.  The error can be in your request, in
RCurl,
on the server side receiving the request or in the script processing the
request
on the server.


And I am (all too) aware of this. From the command line, it works fine,
using curl:
% curl -vvv -u "test:test" -d "profileid=-1" -d "value=1.801"
-d"type=history" http://our.server.com/dbInt/new
* About to connect() to our.server.com port 80 (#0)
*   Trying 192.168.2.23 ... connected
* Connected to our.server.com (192.168.2.23) port 80 (#0)
* Server auth using Basic with user 'test'
> POST /dbInt/new HTTP/1.1
> Authorization: Basic dGVzdDp0ZXN0
> User-Agent: curl/7.21.0 (i686-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o
zlib/1.2.3.4 libidn/1.18
> Host: our.server.com
> Accept: */*
> Content-Length: 37
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 201 Created
< Date: Tue, 22 Feb 2011 19:09:01 GMT
< Content-Length: 0
< Server: Jetty(6.1.25)

The equivalent code in RCurl would be:
postForm('http://our.server.com/dbInt/new',
curlOptions=(userpwd="test:test"), profileid = "-1", value="1.801",
type="history")

When I do run this code in R, I get:
[1] "\n\n\nError 401
UNAUTHORIZED\n\nHTTP ERROR 401\nProblem
accessing /dbInt/new. Reason:\nUNAUTHORIZEDPowered by
Jetty://
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n\n"
attr(,"Content-Type")
  charset
 "text/html" "iso-8859-1"
Adding verbose=T to curlOptions results in an 'unexpected "," in
curlOptions', adding the verbose='true' to opts instead yields the same
result as above. If you should require further information, please ask. Many
thanks!

So it is imperative to try to get diagnostic information.

You used verbose = T  (TRUE).  What did that display?


Nothing


postForm() has a style parameter. It controls how the POST request is
submitted, either application/x-www-form-urlencoded or
multipart/form-data.
Your server script might be expecting the data in a different format
than is being sent. postForm() defaults to the www-form-urlencoded.

But we will need more information to help you if these are not the
cause of the problem.

-- 
Hasan Diwan
Developer
Economic Risk Management LLC

[[alternative HTML version deleted]]

__
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] RCurl Post

2011-02-25 Thread Hasan Diwan
> resp <- postForm('http://our.db/db/new', 'profileid'='181133',
'value'='20110225', 'type'='history','user-agent' = 'R', .opts
=list(verbose=T, userpwd='test:test'))
* About to connect() to our.db port 80 (#0)
*   Trying 192.168.1.1... * connected
* Connected to our.db (192.168.1.1) port 80 (#0)
> POST /db/new HTTP/1.1
Host: our.db
Accept: */*
Content-Length: 452
Expect: 100-continue
Content-Type: multipart/form-data;
boundary=ffe8790c93da

< HTTP/1.1 100 Continue
< HTTP/1.1 401 Unauthorized
< Date: Fri, 25 Feb 2011 19:27:41 GMT
< WWW-Authenticate: Basic realm="US"
< Content-Type: text/html; charset=iso-8859-1
< Cache-Control: must-revalidate,no-cache,no-store
< Content-Length: 1378
< Server: Jetty(6.1.25)
<
* Ignoring the response-body
* Connection #0 to host our.db left intact
* Issue another request to this URL: 'http://our.db/db/new'
* Re-using existing connection! (#0) with host our.db
* Connected to our.db (192.168.1.1) port 80 (#0)
* Server auth using Basic with user 'test'
> POST /db/new HTTP/1.1
Authorization: Basic dGVzdDp0ZXN0
Host: our.db
Accept: */*
Content-Length: 452
Expect: 100-continue
Content-Type: multipart/form-data;
boundary=41b86db89985

< HTTP/1.1 100 Continue
< HTTP/1.1 500 null
< Date: Fri, 25 Feb 2011 19:27:41 GMT
< Content-Type: text/html; charset=iso-8859-1
< Cache-Control: must-revalidate,no-cache,no-store
< Content-Length: 2919
< Server: Jetty(6.1.25)
<
* Connection #0 to host our.db left intact
X> print(resp)
[1] "\n\n\nError 500
null\n\nHTTP ERROR 500\nProblem accessing
/db/new. Reason:\nnullCaused
by:javax.servlet.ServletException: null\n\tat
com.erm.web.NewDistServlet.doPost(NewDistServlet.java:107)\n\tat
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)\n\tat
javax.servlet.http.HttpServlet.service(HttpServlet.java:820)\n\tat
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)\n\tat
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)\n\tat
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)\n\tat
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)\n\tat
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)\n\tat
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)\n\tat
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)\n\tat
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)\n\tat
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)\n\tat
org.mortbay.jetty.Server.handle(Server.java:326)\n\tat
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)\n\tat
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)\n\tat
org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)\n\tat
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)\n\tat
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)\n\tat
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)\n\tat
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)\n\nPowered by
Jetty://
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n\n\n"
attr(,"Content-Type")
  charset
 "text/html" "iso-8859-1"
>


With curl on from command line:
% /usr/bin/curl -u test:test -vvv -d'profileid=181133' -d'value=20110225'
-d'type=history' http://our.db.host/db/new
* About to connect() to our.db.host port 80 (#0)
*   Trying 192.168.1.1... connected
* Connected to our.db.host (192.168.1.1) port 80 (#0)
* Server auth using Basic with user 'test'
> POST /db/new HTTP/1.1
> Authorization: Basic dGVzdDp0ZXN0
> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7
OpenSSL/0.9.8l zlib/1.2.3
> Host: our.db.host
> Accept: */*
> Content-Length: 44
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 201 Created
< Date: Fri, 25 Feb 2011 19:41:51 GMT
< Content-Length: 0
< Server: Jetty(6.1.25)
<
* Connection #0 to host our.db.host left intact
* Closing connection #0

All I want to do is duplicate the curl command's output with RCurl. Help?
Thanks in advance!
-- 
Hasan Diwan
Developer
Economic Risk Management LLC

[[alternative HTML version deleted]]

__
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] How do I make this faster?

2011-04-09 Thread Hasan Diwan
I was on vacation the last week and wrote some code to run a 500-day
correlation between the Nasdaq tracking stock (QQQ) and 191 currency pairs
for 500 days. The initial run took 9 hours(!) and I'd like to make it
faster. So, I'm including my code below, in hopes that somebody will be able
to figure out how to make it faster, either through parallelisation, or by
making changes. I've marked the places where Rprof showed me it was slowing
down:
currencyCorrelation <- function(lagtime = 1) {
  require(quantmod)

  dataTrack <- getSymbols(commandArgs(trailingOnly=T)[1], from='2009-11-21',
to='2011-04-03')
  stockData <- get(dataTrack)
  currencies <- row.names(oanda.currencies[grep(pattern='oz.', fixed=T, x
=as.vector(oanda.currencies$oanda.df.1.length.oanda.df...21.)) == F])
  correlations <- vector()
  values <- list()
  # optimise these loops using the apply family
  for (i in currencies) {
for (j in currencies) {
  if (i == j) next()
  fx <- getFX(paste(i, j, sep='/'), from='2009-11-20', to='2011-04-02')
  # Prepare data by getting rates for market days only
  fx <- get(fx)
  fx <- fx[which(index(fx) %in% index(QQQ$QQQ.Close))]
  correlation <- cor(fx, QQQ$QQQ.Close)
  correlations <- c(correlations, correlation)
  string <- paste(paste(i,j,sep='/'), correlation, sep=',')
  values <- c(values,paste(string,'\n', sep=''))
}
  }
  # TODO eliminate NA's
  values <- values[which(correlations[is.na(correlations) == F])]
  correlations <- correlations[is.na(correlations) == F]
  values <- values[order(correlations, decreasing=T)]
  write.table(values, file=commandArgs(trailingOnly=T)[2], sep='',
qmethod=NULL, quote = F, row.names=F, col.names=F)
  rm('currencies', 'correlations', 'values', 'fx', 'string')
  return()
}
lagtime <- as.integer(commandArgs(trailingOnly=T)[3])
if (is.na(lagtime)) lagtime <- 1
print(paste(Sys.time(), '<--- starting', lagtime, 'day lag currencies
correlation with', commandArgs(trailingOnly=T)[1], 'from 2009-11-20 to
2011-04-03'))
currencyCorrelation(lagtime)
print(paste(Sys.time(), '<--- ended, results in',
commandArgs(trailingOnly=T)[2]))


-- 
Sent from my mobile device
Envoyait de mon telephone mobil

[[alternative HTML version deleted]]

__
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] count number of TRUEs in each row

2011-04-10 Thread Hasan Diwan
Ms Qiao,

On 10 April 2011 14:24, Wendy  wrote:

> I have a huge matrix of TRUE/FALSE table like following, and I want to
> count
> the number of TRUEs in each row. Instead of looping through each row and do
> length(Z[Z==TRUE]), I am wondering if there is an easier way of doing this.
>
>   [,1]   [,2][,3]
> [1,]TRUE FALSE FALSE
> [2,]FALSE TRUE TRUE
>

Does this help...
Z[Z==T]
?

-- 
Sent from my mobile device
Envoyait de mon telephone mobil

[[alternative HTML version deleted]]

__
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] cbind giving NA's?

2011-08-26 Thread Hasan Diwan
I have two xts objects, call them "a" and "b", and am trying to merge them...
> class(a)
[1] "xts" "zoo"
> class(b)
[1] "xts" "zoo"
> head(a)
2010-04-01  7.6343
2010-04-02  7.6343
2010-04-03  7.5458
2010-04-04  7.4532
2010-04-05  7.4040
2010-04-06  7.3317
> head(b)
2010-04-01 568.80
2010-04-05 571.01
2010-04-06 568.22
2010-04-07 563.54
2010-04-08 567.49
2010-04-09 566.22
> head(cbind(a,b))
2010-04-01 568.80  NA
2010-04-01 NA  0.3998
2010-04-02 NA  0.3998
2010-04-03 NA  0.3999
2010-04-04 NA  0.3994
2010-04-05 571.01  NA
> q()
I'd like the cbind'ed version to look like:
2010-04-01 568.800.3998
2010-04-02 NA  0.3998
2010-04-03 NA  0.3999
2010-04-04 NA  0.3994
2010-04-05 571.01  0.3991

What gives? Many thanks, in advance. -- H

-- 
Sent from my mobile device
Envoyait de mon telephone mobil

__
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] cbind giving NA's?

2011-08-26 Thread Hasan Diwan
On 26 August 2011 03:37, R. Michael Weylandt  wrote:
> If you could, dput() them so we can see everything about them. You also
> might see if merge() gives you more expected behavior

Ok...
> dput(a)
structure(c(7.6343, 7.6343, 7.5458, 7.4532, 7.404, 7.3317), class = c("xts",
"zoo"), .indexCLASS = "Date", .indexTZ = "", index = structure(c(1270105200,
1270191600, 1270278000, 1270364400, 1270450800, 1270537200), tzone =
"", tclass = "Date"), .Dim = c(6L,
1L), .Dimnames = list(NULL, "ZWD.UGX"))
> dput(b)
structure(c(28.02, 28.3, 28.38, 28.21, 28.31, 28.47), .indexCLASS =
"Date", .indexTZ = "", src = "yahoo", updated =
structure(1314356091.21457, class = c("POSIXct",
"POSIXt")), class = c("xts", "zoo"), index = structure(c(1270072800,
1270418400, 1270504800, 1270591200, 1270677600, 1270764000), tzone =
"", tclass = "Date"), .Dim = c(6L,
1L), .Dimnames = list(NULL, "SCHB.Close"))
> merge(a,b)
> merge(a,b)
   ZWD.UGX SCHB.Close
2010-04-01  NA  28.02
2010-04-01  7.6343 NA
2010-04-02  7.6343 NA
2010-04-03  7.5458 NA
2010-04-04  7.4532 NA
2010-04-05  NA  28.30
2010-04-05  7.4040 NA
2010-04-06  NA  28.38
2010-04-06  7.3317 NA
2010-04-07  NA  28.21
2010-04-08  NA  28.31
2010-04-09  NA  28.47
> q()

So, no, merge doesn't work...
-- 
Sent from my mobile device
Envoyait de mon telephone mobil

__
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] r-help volcano plot

2011-09-05 Thread Hasan Diwan
On 6 September 2011 08:01, KnifeBoot  wrote:
>  Can't installe packag maDB or limma.

Which R version, and what platform are you using?
-- 
Sent from my mobile device
Envoyait de mon telephone mobil

__
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] How download to spreadsheet?

2011-09-11 Thread Hasan Diwan
require(quantmod)
getSymbols('IBM', from='2010-01-01')
write.csv(Cl(IBM), file='ibm-2010-present.csv')

I can open the resulting file in Excel without problems. Depending on
your preference, you may want to use write.csv2 instead.

On 11 September 2011 06:59, Yumin  wrote:
>    The result will display on the R console. BUT how can we also download
> them onto
> spreadsheet?
-- 
Sent from my mobile device
Envoyait de mon telephone mobil

__
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] (no subject)

2012-07-03 Thread Hasan Diwan
On 3 July 2012 22:03, Akhil dua  wrote:

> and I need to run a seperate regression of every stock on market
> so I want to write a  "for loop"  so that I wont have to write codes again
> and again to run the regression...
>

1. Do give a subject line -- a blank one is commonly used by a virus.
2. In R/S+/most functional languages, you do not want to write a "for
loop". Use apply (and friends) instead.

> my data is in the format given below
>
> Date   Stock1  Stock2   Stock3Market
> 01/01/2000 1   2  3 4
> 01/02/2000 5   6  7 8
> 01/03/2000 1   2  3 4
> 01/04/2000 5   6  7 8
>

For example, if you wanted to know the stocks share of the total market as
a fraction, you'd use something like:
sapply(myData[,c(2:4)], function(x) {
return(as.numeric(x)/as.numeric(myData[,4])) })

Hope that helps.. -- H
-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] changing the x axis labels in a time series plot

2012-07-14 Thread Hasan Diwan
Alternatively:
require(xts)
z.xts <- xts(cbind(1:100, 100:1), order.by=strptime(1322:1421, '%Y')
plot(z.xts)
-- H

> Em 14-07-2012 10:54, Jim Bouldin escreveu:
>
>  OK, this has to be simple but I've searched through help files, mailing
>> list archives and well, everything I could think of, and still no luck.
>>
>> I simply want to change the x axis labels in a time series graph, from its
>> default numbering (which starts at 1 and increments by 1), to values I
>> have
>> in another vector, "Year".  It has to be a time series graph, I don't want
>> to have to use a scatter plot because there are many lines to draw.
>>
>> Example:
>>
>> z = cbind(1:100,100:1); Year = 1322:1421
>> windows()
>> plot.ts(z[,1:2],,"single", xaxt="n", xlab="")
>> axis(1,at=Year)
>>
>> This doesn't work, not any of the permutations I've tried with the various
>> arguments to plot.ts and axis.
>> Thanks for any help.
>>
>

-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] Format Date with Time

2012-07-16 Thread Hasan Diwan
Ms Vogric,
as.POSIXct should be able to help there...


On 16 July 2012 06:40, Jessica Streicher  wrote:

> ?Date
> ?POSIXct
>
> and here you can find the formatting symbols:
> http://stat.ethz.ch/R-manual/R-patched/library/base/html/strptime.html
>
>
> On 16.07.2012, at 15:26, Lauren Vogric wrote:
>
> > How do I format "5/1/2012 8:00:00 PM" into a date?
> >
> >
> >   [[alternative HTML version deleted]]
> >
> > __
> > 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.
>
>
> [[alternative HTML version deleted]]
>
> __
> 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.
>



-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] Dataset in parts - how to join together?

2011-07-10 Thread Hasan Diwan
region1 <- read.table(file1, header=T)
...
region12 <- read.table(file12, header=T)
region <- data.frame(rbind(region1, region=1)..., rbind(region12, region=12)))
rm(region1, region2, region3..., region11, region12)

On 10 July 2011 12:22, majesty  wrote:
> Hello, I am new to R - could somebody suggest a function to investigate for
> the following:
>
> I have data of the form
>
> OA_CODE  VALUE
> xyz           0.42
> abd           0.10
>
> but I have it in 12 separate files, each with output areas and value for one
> of 12 regions. I would like to combine the 12 files into one data set of the
> same format.
>
> Any suggestion would be appreciated, I will read on it.
>
> --
> View this message in context: 
> http://r.789695.n4.nabble.com/Dataset-in-parts-how-to-join-together-tp3658088p3658088.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.
>



-- 
Sent from my mobile device
Envoyait de mon telephone mobil

__
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] How to extract unique indices for time series Data?

2012-07-28 Thread Hasan Diwan
>
>  Here, I guess there are some duplicated dates-index. Is there any
> function available to automatically extract unique indices ???
>

?zooreg should do what you want, if I'm understanding the question properly.
-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] How to write % in pie chart?

2012-08-12 Thread Hasan Diwan
Post yer code and I'd be happy to take a look.
On Aug 11, 2012 10:57 PM, "Manish Gupta"  wrote:

> HI,
>
> I am plotting one pie chart and need to write % inside it. How can i write
> %
> inside it as show in figure below.
>
> http://r.789695.n4.nabble.com/file/n4640078/pie_chart.png
>
> Regards
>
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/How-to-write-in-pie-chart-tp4640078.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.
>

[[alternative HTML version deleted]]

__
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] to clear combobox value....

2012-08-26 Thread Hasan Diwan
Punitha,

On 26 August 2012 02:43, punitha  wrote:

> but i am not knowing what should be written in the command function of a
> button, so that the selected value of combobox should be cleared or come
> back to its default value
>

http://www.tkdocs.com/tutorial/widgets.html there's code here that should
help. If not, contact me off-list. -- H

-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] Loading Chess Data

2012-09-02 Thread Hasan Diwan
Mr Arnold,

> What would be the most efficient way to load the data at the following
>> address into a dataframe?
>>
>
To what end? In other words, what are you trying to achieve with the
ratings list? -- H
-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] How can I export a big data.frame to excel 2010 - file.xlsx?

2012-09-04 Thread Hasan Diwan
Ms. Botrel,

On 4 September 2012 13:52, PamelaBotrel  wrote:

> I need some help to export a data frame with 83 rows and 1411 colums. I
> have
> used the package RODBC until now. But now, I have 1411 colums that I can't
> send to the old excel. If anybody knows a package to convert my data frame
> in xlsx tell me!
>

Several options...
1. write.csv import into Excel and save to an XLSX
2. there is an xlsx package on cran that also, theoretically works. I say,
theoretically, because I have no use for Excel on my systems.
Let me know how you get on... -- H
-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] how to save a heatmap.2 in png /jpeg /tiff

2012-09-09 Thread Hasan Diwan
Mr Stadler,

On 9 September 2012 10:36, Fred  wrote:

> But I don't have any files called "heatmap.2.png " on my computer.
> I really don't understand why I don't get anything !
>

What does getwd() print out as a path? Check there for the your file. -- H
-- 
Sent from my mobile device
Envoyait de mon portable

[[alternative HTML version deleted]]

__
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] install.package tseries

2011-11-20 Thread Hasan Diwan
On 21 November 2011 00:14, Joaquim Andrade  wrote:
> Do you have any clue?
Works for me... How about some further details?
> install.packages('tseries')
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
also installing the dependency ‘quadprog’

trying URL 
'http://mirrors.nics.utk.edu/cran/bin/macosx/leopard/contrib/2.14/quadprog_1.5-4.tgz'
Content type 'application/x-gzip' length 83092 bytes (81 Kb)
opened URL
==
downloaded 81 Kb

trying URL 
'http://mirrors.nics.utk.edu/cran/bin/macosx/leopard/contrib/2.14/tseries_0.10-27.tgz'
Content type 'application/x-gzip' length 393905 bytes (384 Kb)
opened URL
==
downloaded 384 Kb


The downloaded packages are in

/var/folders/3r/6x1cwkvn5lj6wk5pysgyxmm8gn/T//Rtmpp158in/downloaded_packages



-- 
Sent from my mobile device
Envoyait de mon portable

__
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] Suggested alternative to rgdal for Mac for making bubble plots with R 2.14?

2011-11-22 Thread Hasan Diwan
Mr Rupert,

On 23 November 2011 02:32, Jason Rupert  wrote:
> Thanks for any suggested current alternative methods for creating bubble 
> plots in R 2.14.

http://sas-and-r.blogspot.com/2010/09/example-85-bubble-plots-part-3.html

cat = rep(c(1, 2, 3), each=20)
abscissa = rnorm(60)
ordinate = rnorm(60)
z = runif(60)
plotcolor = ifelse(cat==1, "green", ifelse(cat==2, "red", "blue"))
symbols(ordinate, abscissa, circles=z, inches=1/5, bg=plotcolor)

-- 
Sent from my mobile device
Envoyait de mon portable

__
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] Time series merge?

2011-11-26 Thread Hasan Diwan
Try xts (tsObj, order.by=index (tsobj))
On Nov 26, 2011 10:57 AM, "Kevin Burton"  wrote:

> I have two time series
>
>
>
> a <- ts(1:10, start=c(1,6), end=c(2,5), frequency=10)
>
> b <- ts(1:5, start=c(2,1), end=c(2,5), frequency=10)
>
>
>
> Obviously 'b' is a subset of 'a'. I want a single index value indicating
> where that start of 'b' lines up with the start of 'a'. So in this simple
> example I would expect an index of 5. I was playing with 'merge'. But, for
> a
> 'ts' object this does not produce anything that is useful:
>
>
>
> > merge(a,b)
>
>  x
>
> 1 1
>
> 2 2
>
> 3 3
>
> 4 4
>
> 5 5
>
>
>
> I get the same answer if I use 'merge(b,a)' so I don't know how to convert
> this result to something useful. So then I decided to use 'xts'. But the
> conversion fails:
>
>
>
> > ax <- as.xts(a)
>
> Error in as.xts.ts(a) : could not convert index to appropriate type
>
>
>
> For this simple example I could code it myself using a simple for loop but
> if I add capability to handle missing dates, different frequencies, etc. it
> gets complicated very fast.  It seems that 'xts' has more extensive date
> handling facilities that 'ts' but I am stuck since it doesn't look like I
> can convert from 'ts' to 'xts'.
>
>
>
> Thanks in advance for your suggestions.
>
>
>
> Kevin
>
>
>[[alternative HTML version deleted]]
>
> __
> 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.
>

[[alternative HTML version deleted]]

__
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] dismo help

2011-11-27 Thread Hasan Diwan
savePngCentredAt <- function(address) {
  require(dismo)
  x <- geocode(address)
  range <- as.numeric(x[4:7]) + c(-0.01, 0.01, -0.01, 0.01)
  e <- extent(range)
  g <- gmap(e, type = "roadmap")
  require(digest)
  png(path.expand(paste('~/public_html/',digest(address,
algo='sha1'),'.png',sep='')))
  plot(g)
  dev.off()
}

The code above saves a PNG corresponding to a roadmap for given
address. How do I add a marker for the address given to the PNG? Many
thanks! -- H
-- 
Sent from my mobile device
Envoyait de mon portable

__
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] Weird Excel Time Format

2011-11-29 Thread Hasan Diwan
I have a 10-column XLS file, with 2 date fields. As far as I can tell,
they were configured identically in Excel 2010. One of these fields
resembles "39406.577662037", whilst in Excel, it is shown as
"2007-11-20 13:42:20". Applying as.Date() with the default format
doesn't do it. Any ideas as to what format this is? Many thanks! -- H

-- 
Sent from my mobile device
Envoyait de mon portable

__
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] Weird Excel Time Format

2011-11-29 Thread Hasan Diwan
On 29 November 2011 09:32, Prof Brian Ripley  wrote:
> If all else fails, read the help page.  There are examples on ?as.Date of
> reading Excel dates.
I did, it seems there is either (a) a problem with my code, or (b) a
problem with the documentation. See below:
> rawtimeColumn
[1] 39406.577662037  39406.5862847222 39406.592361
39406.5972800926 39406.603819 39406.6445601852 39406.6478587963
39406.6619212963 39406.6634259259 39406.6643518519
[11] 39406.665162037  39406.6659143519 39406.666319
39406.668287037  39406.6702546296 39406.6722106481 39406.6728587963
39406.6731481481 39406.6049768518 39406.585417
[21] 39406.589583 39406.592361 39406.59375
39406.597222 39406.601389 39406.60625  39406.619444
39406.620139 39406.621528 14:5730
[31] 39406.626389 39406.627778 39406.629861
39406.629861 39406.634028 39406.636806 39406.640972
> as.Date(as.numeric(rawtimeColumn), origin='1904-01-01') # per as.Date() help
[1] "1904-01-04" "1904-01-07" "1904-01-13" "1904-01-19" "1904-01-23"
"1904-02-18" "1904-02-21" "1904-02-29" "1904-03-01" "1904-03-02"
"1904-03-03" "1904-03-04" "1904-03-05" "1904-03-06"
[15] "1904-03-07" "1904-03-08" "1904-03-09" "1904-03-10" "1904-01-25"
"1904-01-06" "1904-01-11" "1904-01-13" "1904-01-16" "1904-01-18"
"1904-01-20" "1904-01-26" "1904-01-31" "1904-02-01"
[29] "1904-02-03" "1904-01-02" "1904-02-06" "1904-02-07" "1904-02-10"
"1904-02-10" "1904-02-12" "1904-02-13" "1904-02-15"

These readings were taken at the 23rd of November in 2011.
>
> But I don't believe the time you give. (0.577662037 is just before
> 13:51:50).

It was contrived, so probably was wrong and I should have made that explicit.
-- 
Sent from my mobile device
Envoyait de mon portable

__
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] Weird Excel Time Format

2011-11-29 Thread Hasan Diwan
On 29 November 2011 10:26, Jeff Newmiller  wrote:
> You haven't indicated how you are accessing the Excel file, or whether it is 
> an XLS or XLSX file. It sounds like you might be using rcom or a dependent 
> package, in which case you may need to read the Excel COM interface 
> documentation more carefully. In any event, you can't expect as.Date to 
> understand the floating-point numbers as if they were formatted dates it they 
> aren't.

I'm using the xlsx package to access this file. It is an XLS file. I
think I got it sorted though. The column that has the problem has
NA's, whereas the column that does not is complete.

> For my part, I highly recommend exporting to CSV before importing to R.

Will look into doing so...
-- 
Sent from my mobile device
Envoyait de mon portable

__
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] Reg : Using RJDBC to read UTF-8 characterrs

2011-12-21 Thread Hasan Diwan
Mr Sankaran,
It may be your character set that's wrong or check your MySQL
configuration.
On Dec 21, 2011 12:31 AM, "Raji"  wrote:

> Hi All,
>
>  We are using the following dataset which contains UTF-8 characters and is
> stored in a MySQL database. When we use
> RODBC and read the data, the characters are read correctly.But when we read
> using RJDBC ,the characters are read like 
> カタカナ1
>
> Can you please let me know how we can read the UTF-8 characters as it is
> done by RODBC.
>
> ID code Outlook Temperature HumidityWindy   Play
> a   Sunny   Hot HighFALSE   カタカナ1
> b   Sunny   Hot HighTRUEカタカナ2
> c   OvercastHot HighFALSE   カタカナ3
> d   Rainy   MildHighFALSE   カタカナ1
> e   Rainy   CoolNormal  FALSE   カタカナ2
> f   Rainy   CoolNormal  TRUEカタカナ2
> g   OvercastCoolNormal  TRUEカタカナ1
> h   Sunny   MildHighFALSE   カタカナ3
> i   Sunny   CoolNormal  FALSE   カタカナ3
> j   Rainy   MildNormal  FALSE   カタカナ3
> k   Sunny   MildNormal  TRUEカタカナ2
> l   OvercastMildHighTRUEカタカナ2
> m   OvercastHot Normal  FALSE   カタカナ3
> n   Rainy   MildHighTRUEカタカナ2
> m   OvercastMILDNormal  FALSE   カタカナ1
>
>
> Thanks,
> Raji
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Reg-Using-RJDBC-to-read-UTF-8-characterrs-tp4220650p4220650.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.
>

[[alternative HTML version deleted]]

__
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] Optimising timeboxing in xts

2011-12-23 Thread Hasan Diwan
I don't know if timeboxing is the correct term to use to accomplish
what I'm attempting, so allow me to explain. I have a set n of tagged
observations in time series t. What I'm interested in is taking i
seconds before and after every n. My code is below:
# observations.xts is an xts time series and arg is the number of
seconds to for the timebox
timeboxes <- sapply(c(1:as.numeric(last(index(observations.xts))-arg)),
function(x) { return(observations.xts[index(x) - arg, index(x)+arg])},
simplify=TRUE)
What I'd like to see in timeboxes is observations.xts elements with
timestamps within the range of abs(arg).
-- 
Sent from my mobile device
Envoyait de mon portable

__
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] [R-SIG-Finance] Removing outliers in tick data in R?

2011-12-30 Thread Hasan Diwan
On 30 December 2011 10:21, Michael  wrote:
> But are there reasonably good and realistic methods of identifying
> outliers/errornous quotes  in tick data in R?
Check out the OutlierD package at
http://www.bioconductor.org/packages/release/bioc/html/OutlierD.html.
-- 
Sent from my mobile device
Envoyait de mon portable

__
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] Changing X axis of ggplot

2012-01-02 Thread Hasan Diwan
Aren,
On 2 January 2012 19:34, Aren Cambre  wrote:
> I am making a plot using this:
> p <- ggplot(dallas, aes(x = offense_hour)) + geom_bar() + coord_polar()
> The plot shows up fine, but the X axis labels are 0.0 through 1.0. How
> do I convert this to 0:00 through 23:59 (or whatever may be
> appropriate given the breaks)?

Seeing as there is no source code, I'm taking a stab in the dark, but
the below gives me a pie chart:
to <- as.POSIXlt('23:59:59', format='%H:%M:%S', origin=Sys.Date())
from <- as.POSIXlt('00:00:00', format='%H:%M:%S', origin=Sys.Date())
range <- seq(from, to, by = .5)
dallas <- data.frame(offense_hour = range, stuff = rnorm(c(1:length(range
p <- ggplot(dallas, aes(x = offense_hour) + geom_bar() + coord_polar)
-- 
Sent from my mobile device
Envoyait de mon portable

__
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.


  1   2   >