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] (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] 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] 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] Beginner problem - using mod function to print odd numbers

2021-06-05 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] 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] 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=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] 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] 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] 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=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=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=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.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=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=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=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] 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=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.
>


-- 

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=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 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=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] 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=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=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=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=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=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=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] 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=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] 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=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=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] 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=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=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-30 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=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-06-01 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=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=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-03 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=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] 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=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] 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] 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 <murdoch.dun...@gmail.com>
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 <murdoch.dun...@gmail.com>
>> 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] 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] 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] 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 bogaso.christo...@gmail.com
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] converting Twitter data from txt file

2015-04-22 Thread Hasan Diwan
On 22 April 2015 at 13:05, Erin Hodgess erinm.hodg...@gmail.com 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] 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 zadi...@excite.com 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 r-help@r-project.org
 Subject: Re: [R] How many digits are there in left of dot of 0.0001 ?

 On 25 February 2015 at 17:55, ce zadi...@excite.com 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] 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 zadi...@excite.com 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 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 laomen...@163.com 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.

[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] 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 paulhudson...@gmail.com 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.


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 mamille...@gmail.com 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] 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 michimau...@hotmail.com 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] 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 martavalde...@gmail.com 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] 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, jlu...@ria.buffalo.edu wrote:

 The Weibull and Gumbel distributions are NOT the same.



 Frede Aakmann Tøgersen fr...@vestas.com
 Sent by: r-help-boun...@r-project.org
 05/14/2014 02:01 AM

 To
 eliza botto eliza_bo...@hotmail.com, r-help@r-project.org
 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.commailto:fr...@vestas.com
 http://www.vestas.comhttp://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.commailto:fr...@vestas.com
  To: eliza_bo...@hotmail.commailto:eliza_bo...@hotmail.com;
 r-help@r-project.orgmailto: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.commailto: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.orgmailto: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.orgmailto: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.orgmailto: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] 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 mmal...@gmail.com 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] KalmanForecast (stats)

2013-07-01 Thread Hasan Diwan
On 1 July 2013 19:24, Giovanni Petris gpet...@uark.edu 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] 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 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] 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 lihaw...@gmail.com 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] 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 marc_...@yahoo.fr 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.


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

2013-02-01 Thread Hasan Diwan
Mr Isella,

On 1 February 2013 05:37, Lorenzo Isella lorenzo.ise...@gmail.com 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.


Re: [R] whats wrong in my codes???

2012-12-24 Thread Hasan Diwan
Eliza,
On 24 December 2012 08:34, eliza botto eliza_bo...@hotmail.com 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] 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 aaji...@yahoo.co.in 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 hasan.di...@gmail.com wrote:

 Sir,

 On 30 October 2012 04:32, aajit75 aaji...@yahoo.co.in 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.


Re: [R] Update CSV file content

2012-10-08 Thread Hasan Diwan
Mr Akkara,

On 8 October 2012 05:20, Rantony antony.akk...@ge.com 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 noahsilver...@ucla.edu 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] Class for time series

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

On 4 October 2012 02:43, Poizot Emmanuel emmanuel.poi...@cnam.fr 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] Mac Text editors

2012-09-27 Thread Hasan Diwan
On 27 September 2012 09:26, peter dalgaard pda...@gmail.com 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] 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 maxlklwe...@gmail.comwrote:

 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] 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 frederic.stad...@unifr.ch 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] 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 pamela.bot...@hotmail.com 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] 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] to clear combobox value....

2012-08-26 Thread Hasan Diwan
Punitha,

On 26 August 2012 02:43, punitha punitha@wipro.com 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] 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 mandecent.gu...@gmail.com 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] 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] 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 j.streic...@micromata.de 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] 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] (no subject)

2012-07-03 Thread Hasan Diwan
On 3 July 2012 22:03, Akhil dua akhil.dua...@gmail.com 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.


[R] Rjava on Ubuntu quantal

2012-05-14 Thread Hasan Diwan
I just upgraded to Ubuntu Quantal from Precise and RJava stopped working,
log follows:
0}% /usr/bin/find $HOME/workspace/FinanceOCR/visualizations/ -name '*R'
-print | /usr/bin/xargs -n 1 -i% /usr/bin/Rscript % $1 [~]
Loading required package: RJDBC
Loading required package: methods
Loading required package: DBI
Loading required package: rJava
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object
'/usr/lib/R/site-library/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
Failed with error: ‘package ‘rJava’ could not be loaded’
Error: could not find function JDBC
Execution halted
Loading required package: RJDBC
... and my sessionInfo:
% R -e 'sessionInfo()'

   [~]

R version 2.15.0 (2012-03-30)
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i686-pc-linux-gnu (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

 sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: i686-pc-linux-gnu (32-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=C LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

Thanks for the kind assistance... Cheers -- 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] difficulty in Formatting time series data

2012-04-22 Thread Hasan Diwan
Raghu,

On 22 April 2012 09:53, Raghuraman Ramachandran optionsra...@gmail.comwrote:

 I have a data frame (from CSV file) which has its first column called Date.
 The Date is in the format mm/dd/. I was trying to get the weekday for
 these dates and I tried using wday() and day.of.week() functions and both
 of them gave me precisely the wrong answers. I think the issue lies in the
 proper formatting of dates. The class of this column is a factor class and
 hence I tried converting into POSIXlt, xts, zoo objects and yet I could not
 get the weekday correctly. Anyone has any suggestions please?


Try this:
# assume dataIn is where the CSV files data is...
dataIn$Date - as.POSIXct(dataIn$Date, format='%m/%d/%y')
dataIn - cbind(dataIn, day.of.week = format(dataIn$Date, format='%A')

-- 
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 divide data by week

2012-04-13 Thread Hasan Diwan
Stefano,

On 13 April 2012 20:51, Stefano Sofia stefano.so...@regione.marche.itwrote:

 I have a data frame as below specified.
 From the 1st of May to the 30th of September of several years (e.g. from
 2004 to 2011) I have a frequency of accidents.
 I need the mean of accidents divided by weeks (i.e. the mean of accidents
 from the 1st to the 7th of May of all the years, from the 8th to the 14th
 of May,
 ..., from the 29th to the 31st of May, from the 1st to the 7th of July and
 so on).
 Is there an easy way to do that?


Take a look at
https://bitbucket.org/hd1/financeocr/raw/13c4990bd21b/visualizations/dayAmountsHist.Rto
get the subsets and sapply(list, mean, simplify=TRUE). -- 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] Most efficient way to do this...

2012-04-09 Thread Hasan Diwan
I have time-series data looking like this:
 dataIn[sample(c(1:nrow(dataIn)), 25),]
 accelerometer_y id data_block_epoch_time
782   0.8424 201300 133179733
1868  0.3432 202386 1331797384000
1828  0.3510 202346 1331797382000
1026  0.2184 201544 1331797342000
1569  0.3432 202087 1331797369000
1453  0.3588 201971 1331797363000
1204  0.3666 201722 1331797351000
1821  0.3588 202339 1331797382000
860   0.8658 201378 1331797333000
910   0.8580 201428 1331797336000
1488  0.3432 202006 1331797365000
578   0.9126 201096 1331797319000
1478  0.3666 201996 1331797364000
1183  0.3588 201701 133179735
29   -0.1716 200547 1331797292000
1540  0.3588 202058 1331797367000
392  -0.1560 200910 133179731
1533  0.3744 202051 1331797367000
1016  0.6318 201534 1331797341000
314  -0.1560 200832 1331797306000
410  -0.1638 200928 1331797311000
769   0.8580 201287 1331797329000
1101  0.3588 201619 1331797346000
403  -0.1638 200921 1331797311000
1794  0.3666 202312 133179738

The id field represents the subsecond value in the timestamp (n
ids/second). What I'd like to do is combine the fields, so that I'm left
with an equally-spaced timeseries with readings. What's the most efficient
way to do this using R? There are an arbitrary number of timestamps per
second. Many thanks! -- 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] Finding Instances of a Pattern Throughout Data Set

2012-04-02 Thread Hasan Diwan
I have approximately 2.5 million rows from a number of sensor
readings. Having plotted these, I can see a given pattern (say a spike
in the amplitude away from the mean). I would now like to automate
this procedure as we're expecting a great deal more data in the near
future. Is there any package or function that will make this possible?
Many thanks! I suppose, I could do something like:
amplitude - abs(sensorReadings[sensorReadings[,2]  1.2 *
median(sensorReadings[,2]),])
Is this the most efficient way to do what I want or not?
-- 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] Finding Instances of a Pattern Throughout Data Set

2012-04-02 Thread Hasan Diwan
Mr Gunter,

On 2 April 2012 21:15, Bert Gunter gunter.ber...@gene.com wrote:
 I strongly suggest you consult with a local statistician. Your
 description is far too vague (to me anyway) to make any sense of and
 probably requires a good deal of back and forth between you and a
 competent data analyst to pin down what the issues and constraints
 are. For example, what constitutes interesting patterns? --  do the
 data need to be analyzed in real time? -- Are visual displays
 sufficient or is some kind of numeric indication needed? ... etc. etc.
 One tentative word of advice, though: with this much data, do not get
 embroiled with P values or other measures of statistical
 significance: anything you can see will be significant.

All I want to show is that I can find instances of any pattern
throughout our data sets and list them. If the pattern I see is when
the accelerometer is 120% of normal and the gyroscope reading is
steady for 3 seconds, how do I find this pattern throughout different
data sets? -- 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] Format wanted...

2012-03-25 Thread Hasan Diwan
Duncan,

On 25 March 2012 15:28, Duncan Murdoch murdoch.dun...@gmail.com wrote:
 In case anyone is interested, I want to output code in a language (GLSL)
 that sees 1 and 1. as different types.  I want a floating point value, so I
 need the decimal point.

GLSL, assuming it's the one that I'm looking at[1], supports implicit
conversion from integer to float by appending .0 to the end.

-- 
Sent from my mobile device
Envoyait de mon portable
1. http://www.opengl.org/wiki/GLSL_Types#Implicit_conversion

__
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] ggmap crash

2012-03-16 Thread Hasan Diwan
Not sure if this is the right place to report this, but:

Am using ggmap to generate a map of a bounding box from 161
latitude/longitude pairs and the code crashes R (in ess). Data is at
http://analysis.d8u.us/~hdiwan/plotSource.csv and the code to read it
is below. I'm not sure if ess, emacs, ggmap, R, or my laptop is to
blame. Here's the code:
 rmc - read.csv('http://analysis.d8u.us/~hdiwan/rmc.csv', header=TRUE)
 siteLat = c(as.numeric(rmc$latitude))
 siteLon = c(as.numeric(rmc$longitude))
 sites - as.data.frame(cbind(siteLat, siteLon, ''))
 lats - c(floor(min(siteLat))-10, ceiling(max(siteLat))+10)
 lons - c(floor(min(siteLon))-10, ceiling(max(siteLon))+10)
 map - GetMap.bbox(c(min(siteLon)-5, max(siteLon)+5), c(min(siteLat)-5, 
 max(siteLat)+5), maptype='satellite')
[1] 
http://maps.google.com/maps/api/staticmap?center=53.277508,-9.011888zoom=5size=640x640maptype=satelliteformat=png32sensor=true;
 lonr - c(map$BBOX$ll[2], map$BBOX$ur[2])
 latr - c(map$BBOX$ll[1], map$BBOX$ur[1])
 lonr - c(map$BBOX$ll[2], map$BBOX$ur[2])
 latr - c(map$BBOX$ll[1], map$BBOX$ur[1])
 ggplot(sites, aes(siteLon, siteLat)) + annotation_raster(h_raster, lonr[1], 
 lonr[2], latr[1], latr[2]) + geom_point(aes(x=siteLon, y=siteLat), 
 colour='red', data = sites)

 *** caught segfault ***
address 0x196188000, cause 'memory not mapped'


Traceback:
 1: grid.Call.graphics(L_raster, x$raster, x$x, x$y, x$width,
x$height, resolveHJust(x$just, x$hjust), resolveVJust(x$just,
x$vjust), x$interpolate)
 2: drawDetails.rastergrob(x, recording = FALSE)
 3: drawDetails(x, recording = FALSE)
 4: drawGrob(x)
 5: recordGraphics(drawGrob(x), list(x = x), getNamespace(grid))
 6: grid.draw.grob(x$children[[i]], recording = FALSE)
 7: grid.draw(x$children[[i]], recording = FALSE)
 8: drawGTree(x)
 9: recordGraphics(drawGTree(x), list(x = x), getNamespace(grid))
10: grid.draw.gTree(x$children[[i]], recording = FALSE)
11: grid.draw(x$children[[i]], recording = FALSE)
12: drawGTree(x)
13: recordGraphics(drawGTree(x), list(x = x), getNamespace(grid))
14: grid.draw.gTree(gtable_gTree(x), recording)
15: grid.draw(gtable_gTree(x), recording)
16: grid.draw.gtable(gtable)
17: grid.draw(gtable)
18: print.ggplot(list(data = list(siteLat = c(53.277465, 53.277482,
53.277533, 53.277608, 53.277657, 53.277673, 53.277658, 53.277643,
53.27763, 53.27763, 53.277642, 53.277645, 53.277642, 53.277637,
53.277637, 53.277645, 53.277648, 53.277645, 53.27764, 53.277637,
53.277628, 53.27762, 53.277612, 53.277598, 53.277593, 53.277607,
53.277603, 53.277605, 53.27761, 53.277617, 53.277623, 53.277632,
53.277632, 53.277632, 53.27763, 53.277628, 53.277628, 53.277628,
53.277628, 53.277638, 53.277643, 53.277653, 53.277663, 53.277665,
53.277667, 53.277668, 53.27767, 53.277688, 53.277688, 53.277692,
53.2777, 53.277703, 53.277705, 53.277707, 53.277708, 53.277708,
53.277707, 53.277705, 53.277703, 53.277703, 53.277702, 53.277702,
53.2777, 53.277698, 53.277697, 53.277695, 53.27769, 53.277702,
53.27771, 53.277712, 53.277715, 53.277725, 53.277725, 53.277725,
53.277723, 53.277723, 53.277723, 53.277722, 53.27772, 53.277718,
53.27772, 53.277715, 53.277707, 53.277688, 53.27769, 53.27769,
53.277685, 53.277677, 53.277673, 53.277678, 53.277687, 53.277695,
53.277702, 53.277702, 53.277703, 53.2777, 53.277695, 53.277707,
53.277718, 53.277728, 53.277742, 53.277753, 53.277748, 53.277742,
53.277747, 53.27774, 53.277748, 53.277742, 53.277735, 53.277728,
53.277743, 53.277735, 53.27773, 53.277727, 53.277718, 53.27771,
53.277713, 53.277707, 53.277692, 53.277688, 53.277682, 53.27767,
53.277662, 53.277652, 53.277645, 53.277645, 53.277632, 53.277617,
53.277603, 53.277597, 53.277593, 53.277585, 53.277575, 53.277567,
53.277555, 53.277548, 53.277535, 53.277535, 53.277528, 53.277522,
53.277513, 53.277503, 53.277493, 53.277482, 53.277472, 53.277457,
53.277458, 53.277448, 53.277453, 53.277445, 53.277438, 53.27743,
53.277435, 53.277427, 53.277435, 53.277427, 53.277418, 53.277423,
53.277417, 53.27741, 53.277413, 53.277415, 53.277428, 53.277433,
53.277438, 53.277438, 53.277435, 53.27744, 53.277435, 53.277433,
53.277448, 53.277442, 53.277445, 53.27744, 53.27744, 53.277438,
53.277438, 53.277437, 53.277433, 53.277428, 53.277415, 53.277403,
53.27739, 53.277382, 53.277372, 53.277357, 53.27734, 53.277322,
53.2773, 53.27728, 53.277263), siteLon = c(-9.01199, -9.011975,
-9.011978, -9.01198, -9.011932, -9.011922, -9.011915, -9.011912,
-9.011907, -9.011923, -9.011932, -9.011945, -9.011958, -9.01197,
-9.011977, -9.011977, -9.01196, -9.01194, -9.011913, -9.011905,
-9.011907, -9.0119, -9.011903, -9.011903, -9.011905, -9.011912,
-9.011895, -9.011903, -9.011908, -9.011903, -9.011898, -9.011887,
-9.011885, -9.011885, -9.011883, -9.011883, -9.011885, -9.011885,
-9.011887, -9.011892, -9.011897, -9.011895, -9.011903, -9.011907,
-9.011908, -9.011912, -9.011915, -9.011922, -9.011915, -9.011918,
-9.011927, -9.011932, -9.011932, -9.011933, -9.011932, -9.011932,
-9.011932, -9.01193, -9.011928, -9.011928, -9.011928, -9.011928,

[R] KalmanSmooth

2012-03-07 Thread Hasan Diwan
I have a bunch of clean timeseries data obtained from a sensor and I'd
like to apply a Kalman Filter to it to smoothe it out. Through a few
days of Googling, reading papers, implementing such a filter in
various languages, I finally realised that it may be built into R. So
I did a ??kalman at the R prompt and found that it is indeed there.
However, the help page is a tad bare, which is probably why it doesn't
show up in my days of searching. Someone wrote the code, someone
clearly made use of it at some point. If that someone is on this list,
would said person please post sample code? Many thanks!
-- 
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] help updating package rJava (on ubuntu)

2012-02-18 Thread Hasan Diwan
On 18 February 2012 13:13, Karl Brand k.br...@erasmusmc.nl wrote:
 Thanks for yout fast response. Thing is - i managed to get Version 0.9-1
 installed and fully functional. And

 $ locate jdk
 returns too many entries to post here, so i'm pretty sure its on the
 machine.


What you want to look for is javac, not jdk. On my ubuntu system, this
is to be found at /usr/lib/jvm/java-6-openjdk-i386/bin/javac

 So i'd like to know how i can ensure it's registered in R. This i have no
 idea how to do. I simply don't have enough R and linux experience. Also the
 thread i mentioned
 http://stackoverflow.com/questions/3311940/r-rjava-package-install-failing
 seems to be about pointing R at the right location of certain aspects of
 Java. But lacks enough explicit details for myself to be able use.

A previous response indicated R javareconf -- this is the only
configuration you should need. Let me know if you have further
problems.
-- 
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] still need read.zoo command help

2012-02-17 Thread Hasan Diwan
Henry,
You're reading a CSV with read.zoo. This is not likely to work. The
way I'd do this is:
data - read.csv('/tmp/Kevin-0-comma-ITPower.txt', header=FALSE)
z - zoo(data[,2], order.by=as.POSIXct(data[,1], format='%d/%m/%y
%H:%M:%S') # or whatever your format actually is...

-- 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] time series interpolation - zoo? approx? spline? what to use?

2012-02-16 Thread Hasan Diwan
Sir,

On 16 February 2012 16:55, Henry hcco...@lbl.gov wrote:
 Please see my question from a few minutes ago - I wanted to improve the
 title.
xts über alles -- 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] Spline Question

2012-02-14 Thread Hasan Diwan
 dput(sensor.sample)
structure(c(1328565718.65, 1328566608.9, 1328566162.65, 1328566571.1,
1328566598.85, 1328565634.3, 1328566513.95, 1328565123.65, 1328565827.1,
1328566719.9, 1328565527.55, 1328565118.05, 1328565556.85, 1328565623.85,
1328565230.75, 1328566083.85, 1328566012.45, 1328566795.75, 1328565262.85,
1328566191.35, 1328565827.8, 1328566384.25, 1328565376.95, 1328566006.8,
1328566570.05, 1328565570, 1328565916.6, 1328566915.35, 1328565693.05,
1328566849.5, 1328565591.55, 1328565161.55, 1328566854.75, 1328566697.1,
1328566807.7, 1328565764.6, 1328565545.3, 1328566294.5, 1328566900.1,
1328566583.1, 1328566114.65, 1328565407.35, 1328566168.05, 1328565560.55,
1328565310.9, 1328565523.45, 1328566256.55, 1328566751.15, 1328565915.5,
1328565945.3, 1328565814.35, 1328566076.3, 1328565793.55, 1328565680.55,
1328566642.8, 1328565417.55, 1328566806.45, 1328566174.2, 1328566692.85,
1328565409.2, 1328566878.25, 1328565824, 1328566747.95, 1328566569.2,
1328566781.5, 1328566408.35, 1328566267.05, 1328566031.15, 1328566758.35,
1328565973.6, 1328566718, 1328566176.5, 1328565351.5, 1328565443.4,
1328565119.65, 1328565134.9, 1328566771, 1328565589, 1328566621.05,
1328565096.2, 1328566427.05, 1328566122.15, 1328565815.65, 1328566352.8,
1328566432, 1328566943.5, 1328566807.25, 1328565701.15, 1328566496.4,
1328565461.7, 1328565331.65, 1328565853.85, 1328565757.1, 1328566760.75,
1328565823.85, 1328566728.2, 1328566586.75, 1328565387.65, 1328565734.6,
1328565377.95, 1328566264.2, 1328565783.75, 1328566498.65, 1328565179.3,
1328565481.8, 1328565562.9, 1328565256.9, 1328566797.9, 1328566244.25,
1328565600.75, 1328566407.6, 1328566061.5, 1328566122.35, 1328565930.8,
1328565306.55, 1328565323.55, 1328565401.9, 1328565454.3, 1328566016.65,
1328566627.2, 1328566683.45, 1328566251.65, 1328565110.8, 1328565600.95,
1328565067.2, 1328565476.55, 1328565987.35, 1328566491.85, 1328566170.15,
1328565781.55, 1328566931, 1328565904.65, 1328566650.35, 1328565598.9,
1328566353.75, 1328566522.4, 1328565898.85, 1328565676.85, 1328566563.1,
1328565671.05, 1328565107.45, 1328565872.6, 1328565417.45, 1328565575.9,
1328565685.65, 1328566090.9, 1328566208.75, 1328566393.45, 1328565468.25,
1328565761.35, 1328566691.3, 1328565834.4, 1328565677.9, 1328566502.6,
1328566861.75, 1328566189.3, 1328565953.25, 1328566378.75, 1328565684.75,
1328565505.55, 1328565862.55, 1328565475.15, 1328566436.65, 1328566075.35,
1328566405, 1328565732.4, 1328566813.7, 1328566316.9, 1328565333.6,
1328565845.55, 1328565067.15, 1328565793.5, 1328566779.55, 1328565920.8,
1328565224.15, 1328566109.55, 1328565718.1, 1328565167.05, 1328565569.4,
1328565712, 1328565457.45, 1328565787.15, 1328566688.75, 1328565955.35,
1328565071.65, 1328566758.6, 1328566224.65, 1328566241.8, 1328565577.15,
1328565915.65, 1328566746.65, 1328566529.25, 1328565608, 1328566423.5,
1328566679.75, 1328566209.25, 1328565187.05, 1328565999.1, 1328565900.05,
1328565788.3, 1328565416.3, 1328565825.5, 1328566934.8, 1328565293.9,
1328566320.45, 1328566359.25, 1328566768.2, 1328565884, 1328566709.8,
1328565500.15, 1328565407.25, 1328565310.15, 1328566339.25, 1328565325.2,
1328565657.65, 1328566649.95, 1328565668.4, 1328566041.05, 1328565353.85,
132856.8, 1328565160.45, 1328566730.2, 1328565463.6, 1328565367.3,
1328565871.65, 1328566409.3, 1328565188.95, 1328565697.3, 1328566938.3,
1328566896.85, 1328565814.15, 1328565786.65, 1328565651.4, 1328566027.7,
1328565577.55, 1328565833.1, 1328565565.05, 1328566055.5, 1328565797.3,
1328566736.4, 1328565117.1, 1328565278.05, 1328565453.3, 1328566725.8,
1328566609.7, 1328565200.7, 1328566554.8, 1328565170.2, 1328565926.05,
1328566840.8, 1328565313.55, 1328566225.35, 1328565366.1, 1328565183.25,
1328566261.8, 1328565673.55, 1328566884.8, 1328566264.65, 1328565216.35,
1328566879.4, 1328566720, 1328565767.1, 1328566113.35, 1328565657.05,
1328566331.9, 1328565554.05, 1328565239.25, 1328565124.6, 1328565789.65,
1328566444.9, 1328565532.2, 1328566719.35, 1328565205.45, 1328566617.45,
1328565708.85, 1328566155.35, 1328565977.55, 1328566142, 1328566342.25,
1328565232.15, 1328566016.7, 1328565895.85, 1328566345.35, 1328566500.7,
1328566403.5, 1328566895.45, 1328565636.5, 1328565809.75, 1328565537.05,
1328566369.45, 1328566340.4, 1328565180, 1328565641.05, 1328565204,
1328566082.05, 1328566183.9, 1328566527.1, 132857.85, 1328566297.2,
1328566094.65, 1328565577.45, 1328566841.05, 1328566422.05, 1328565968.4,
1328566527.5, 1328565450.85, 1328565194.3, 1328565859.05, 1328565790.7,
1328566536.05, 132856.05, 1328566847.6, 1328566431.85, 1328565081.7,
1328565942.8, 1328566154.7, 1328565312.55, 1328565370.95, 1328565222.9,
1328566301.45, 1328565861.2, 1328565974.6, 1328566650.85, 1328566048.4,
1328565780.1, 1328566022.3, 1328566136, 1328566030.75, 1328566877.05,
1328566552.6, 1328565647.2, 1328565181.65, 1328565565.3, 1328566545.1,
1328565860.75, 1328566520.7, 1328565431.65, 1328566769.5, 1328565816.6,
1328565257.75, 1328566903.45, 1328565080.15, 1328565737.4, 

Re: [R] Spline Question

2012-02-14 Thread Hasan Diwan
Rolf,

On 14 February 2012 21:26, Rolf Turner rolf.tur...@xtra.co.nz wrote:
    What did you actually *do* to create your spline?
    Did you use spline() or splinefun()?  And if not, why not?

Yes... I used the spline() function to get a list of points that
should go though every point in the dataset, but it does not go
through each point, just most of them.

Is this what it is supposed to do? If so, my understanding of the
maths underlying it are incorrect -- this is entirely possible as
well.
-- 
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] only 0s may be mixed with negative subscripts

2012-02-13 Thread Hasan Diwan
I'd like to get the sum of every other row in a data.frame. When I
actually set about doing this, I get the error in the subject line of
this message. A sample of my data is below, followed by the function
call that should give me the results I want:

 dput(head(sens2))
structure(list(Time = c(1328565067, 1328565067.05, 1328565067.1,
1328565067.15, 1328565067.2, 1328565067.25), Y = c(0.0963890795246276,
0.227296347215609, 0.240972698811569, 0.221208948983498, 0.230898231782485,
0.203282153087549), X = c(0.0245045248243853, 0.0835679411703579,
0.0612613120609633, 0.058568910563872, 0.0511868450318788, 0.0557714205674231
), rownumber = 1:6), .Names = c(Time, Y, X, rownumber
), row.names = c(NA, 6L), class = data.frame)
 speedX - sapply(sens2[sens2$rownumber %% 2 == 0,], function(row) { 
 cumsum(c(sens2[row+1,3], sens2[row,3]))}, simplify=TRUE)
Error in xj[i] : only 0's may be mixed with negative subscripts
Help?
-- 
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] only 0s may be mixed with negative subscripts

2012-02-13 Thread Hasan Diwan
On 13 February 2012 14:46, ilai ke...@math.montana.edu wrote:
 The function you posted runs without error (on these 6 lines), but
 does not return anything that looks remotely like a sum, or cumsum of
 anything. Can you clarify what you are trying to do? I assume by sum
 of every other row you don't mean summing Time, X and Y for rows
 1,3,5,..., ?

I'm trying to get a piecewise sum of every n rows in a given column in
this data set.
 For the sum of sens2[c(1,3,5,...),] for every column (assuming no NA's
 in the data) you could

I do format checking well before getting to this stage in the analysis.

  (1:nrow(sens2) %% 2) %*% as.matrix(sens2)

That does not do what I want... Again, what it should return is a list
of the sum of the current and preceding row.
-- 
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] Scriptable Integration

2012-02-10 Thread Hasan Diwan
My data:
 dput(mydata)
structure(list(V1 = c(1328565067, 1328565067.05, 1328565067.1,
1328565067.15, 1328565067.2, 1328565067.25), V2 = c(0.0963890795246276,
0.227296347215609, 0.240972698811569, 0.221208948983498, 0.230898231782485,
0.203282153087549), V3 = c(0.0245045248243853, 0.0835679411703579,
0.0612613120609633, 0.058568910563872, 0.0511868450318788, 0.0557714205674231
)), .Names = c(V1, V2, V3), row.names = c(NA, 6L), class = data.frame)

I'd like to apply an arbitrary number of integrations of the
splinefunc from mydata$V2 and mydata$V3. Therefore, it should return a
function. Anyone have any idea as to a package that allows this? 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] Scriptable Integration

2012-02-10 Thread Hasan Diwan
Michael,
On 10 February 2012 18:11, R. Michael Weylandt
michael.weyla...@gmail.com wrote:
 I'm not quite sure what you mean, but perhaps this will help:
 spf - splinefun(mydata$V2)
 splInt - function(low, up) integrate(spf, low, up)$value

Sort of, I'm looking to get the nth order integral, where the only
thing I know about n is that it is greater than 1, but in practise
will be under 4. Something like:
spf - rep(splinefun(myData$V2, times=(n-1))
splInt - integrate(spf, min(myData$V2), max(myData$V3))

However, I can't seem to figure out how to get splinefun to evaluate
itself. Hope that's clearer and thanks for the help!
-- 
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] Zoomable time series plots

2012-02-07 Thread Hasan Diwan
Not sure if the question is appropos, but I have multiple csv's which
are read into an xts object, corresponding to telemetry data
(accelerometer, magnetometer/compass, and gyroscope). For examination,
it would be über useful if plot.zoo (or something similar) allowed me
to zoom in and out of a subset of the time axes.

-- 
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] read.csv Duplicate row.names not allowed

2012-02-06 Thread Hasan Diwan
I'm trying to read in a CSV, with lines looking like:
HEADER,  Latitude DecDeg,  Latitude Hemisphere,  Longitude DecDeg,
Longitude Hemisphere,  Speed knots,  Bearing Degrees,  fixQualityGga,
noOfSatGga,  altGga,  heightGga,  selectionGsa,  fixGsa,  pdopGsa,
hdopGsa,  vdopGsa,  noOfSatGsv,  Time, *checkSum
$GPS, 3747.0224, N, 12223.4522, W, 0.36, 348.21, 1, 3, 4.01, 175.5,
-25.2, A, 2, 4.14, 4.01, 1.00, 00, 1328565081, *0E
$GPS, 3747.0894, N, 12223.4684, W, 0.44, 348.21, 1, 4, 1.65, 14.4,
-25.2, A, 3, 1.92, 1.65, 0.99, 00, 1328565082, *3D
$GPS, 3747.0897, N, 12223.4685, W, 0.13, 348.21, 1, 6, 1.23, 14.0,
-25.2, A, 3, 1.57, 1.23, 0.98, 00, 1328565083, *32
... using read.csv and am getting the error message in the subject
line (Duplicate row.names not allowed). Any idea what is causing
this?
-- 
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] Grouping miliseconds By Hours

2012-02-05 Thread Hasan Diwan
I have a list of numbers corresponding to timestamps, a sample of which follows:
c(1327211358, 1327221999, 1327527296, 1327555433, 1327701042,
1327761389, 1327780993, 1327815670, 1327822964, 1327897497, 1327897527,
1327937072, 1327938300, 1327957589, 1328044466, 1328127921, 1328157588,
1328213951, 1328236836, 1328300276, 1328335936, 1328429102)

I would like to group these into hours. In other words, something like:
c( 2012-01-31 21:14:26 PST 2012-02-01 20:25:21 PST
 2012-02-02 04:39:48 PST 2012-02-02 20:19:11 PST
2012-02-03 02:40:36 PST 2012-02-03 20:17:56 PST
2012-02-04 06:12:16 PST 2012-02-05 08:05:02 PST)
Hour  Hits
21  1
20  3
41
21
61
81

How would I do this without too much pain (from a CPU perspective)?
This is a subset of a million entries and I would rather not go
through these manually... So, any advice? 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] PosixCT subsecond accuracy

2012-01-27 Thread Hasan Diwan
A sample of the data I have is:
 head(sensor)
  logged_onaccx   accy   accz compassx  compassy compassz
gyrox  gyroy  gyroz
1 1326561428000 -0.4602 0.8346 0.0936 0.145508 -0.350586 0.259766
59.617390  28.521740  59.617390
2 1326561428050 -0.4212 1.0452 0.1326 0.219727 -0.321289 0.241211
88.695656  27.478260  88.695656
3 1326561428100 -0.2496 1.3416 0.2886 0.214844 -0.326172 0.141602
29.565218 -14.747826  29.565218
4 1326561428150 -0.3276 1.0374 0.0546 0.261719 -0.314453 0.243164
8.765218  16.556522   8.765218
5 1326561428200 -0.3588 1.0686 0.2418 0.229492 -0.307617 0.212891
-33.808697  35.756523 -33.808697
6 1326561428250 -0.3120 1.0686 0.2652 0.261719 -0.289062 0.246094
-40.347828  24.626087 -40.347828

The first column is epoch time. I read that POSIXct has support for
this, sort of[1]. So, I tried:
 sensor[,1] - as.POSIXct(sensor[,1], origin='1970-01-01 12:00:00.000')
 head(sensor)
logged_onaccx   accy   accz compassx  compassy
compassz  gyrox  gyroy  gyroz
1 1970-01-01 12:00:20 -0.4602 0.8346 0.0936 0.145508 -0.350586
0.259766  59.617390  28.521740  59.617390
2 1970-01-01 12:00:10 -0.4212 1.0452 0.1326 0.219727 -0.321289
0.241211  88.695656  27.478260  88.695656
3 1970-01-01 12:00:00 -0.2496 1.3416 0.2886 0.214844 -0.326172
0.141602  29.565218 -14.747826  29.565218
4 1970-01-01 12:00:50 -0.3276 1.0374 0.0546 0.261719 -0.314453
0.243164   8.765218  16.556522   8.765218
5 1970-01-01 12:00:40 -0.3588 1.0686 0.2418 0.229492 -0.307617
0.212891 -33.808697  35.756523 -33.808697
6 1970-01-01 12:00:30 -0.3120 1.0686 0.2652 0.261719 -0.289062
0.246094 -40.347828  24.626087 -40.347828

That reading is quite far off, a more accurate reading should be:
 sensor[,1] - as.POSIXct(sensor[,1]/1000, origin='1970-01-01 12:00:00')
 head(sensor)
logged_onaccx   accy   accz compassx  compassy
compassz  gyrox  gyroy  gyroz
1 2012-01-15 05:17:08 -0.4602 0.8346 0.0936 0.145508 -0.350586
0.259766  59.617390  28.521740  59.617390
2 2012-01-15 05:17:08 -0.4212 1.0452 0.1326 0.219727 -0.321289
0.241211  88.695656  27.478260  88.695656
3 2012-01-15 05:17:08 -0.2496 1.3416 0.2886 0.214844 -0.326172
0.141602  29.565218 -14.747826  29.565218
4 2012-01-15 05:17:08 -0.3276 1.0374 0.0546 0.261719 -0.314453
0.243164   8.765218  16.556522   8.765218
5 2012-01-15 05:17:08 -0.3588 1.0686 0.2418 0.229492 -0.307617
0.212891 -33.808697  35.756523 -33.808697
6 2012-01-15 05:17:08 -0.3120 1.0686 0.2652 0.261719 -0.289062
0.246094 -40.347828  24.626087 -40.347828

But now the fractional seconds are missing... Help? -- H
-- 
Sent from my mobile device
Envoyait de mon portable

1. https://stat.ethz.ch/pipermail/r-devel/2009-March/052621.html

__
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] PosixCT subsecond accuracy

2012-01-27 Thread Hasan Diwan
Never mind... options(digits.sec) is what I needed to set... -- H

On 27 January 2012 10:44, Hasan Diwan hasan.di...@gmail.com wrote:
 A sample of the data I have is:
 head(sensor)
      logged_on    accx   accy   accz compassx  compassy compassz
 gyrox      gyroy      gyroz
 1 1326561428000 -0.4602 0.8346 0.0936 0.145508 -0.350586 0.259766
 59.617390  28.521740  59.617390
 2 1326561428050 -0.4212 1.0452 0.1326 0.219727 -0.321289 0.241211
 88.695656  27.478260  88.695656
 3 1326561428100 -0.2496 1.3416 0.2886 0.214844 -0.326172 0.141602
 29.565218 -14.747826  29.565218
 4 1326561428150 -0.3276 1.0374 0.0546 0.261719 -0.314453 0.243164
 8.765218  16.556522   8.765218
 5 1326561428200 -0.3588 1.0686 0.2418 0.229492 -0.307617 0.212891
 -33.808697  35.756523 -33.808697
 6 1326561428250 -0.3120 1.0686 0.2652 0.261719 -0.289062 0.246094
 -40.347828  24.626087 -40.347828

 The first column is epoch time. I read that POSIXct has support for
 this, sort of[1]. So, I tried:
 sensor[,1] - as.POSIXct(sensor[,1], origin='1970-01-01 12:00:00.000')
 head(sensor)
            logged_on    accx   accy   accz compassx  compassy
 compassz      gyrox      gyroy      gyroz
 1 1970-01-01 12:00:20 -0.4602 0.8346 0.0936 0.145508 -0.350586
 0.259766  59.617390  28.521740  59.617390
 2 1970-01-01 12:00:10 -0.4212 1.0452 0.1326 0.219727 -0.321289
 0.241211  88.695656  27.478260  88.695656
 3 1970-01-01 12:00:00 -0.2496 1.3416 0.2886 0.214844 -0.326172
 0.141602  29.565218 -14.747826  29.565218
 4 1970-01-01 12:00:50 -0.3276 1.0374 0.0546 0.261719 -0.314453
 0.243164   8.765218  16.556522   8.765218
 5 1970-01-01 12:00:40 -0.3588 1.0686 0.2418 0.229492 -0.307617
 0.212891 -33.808697  35.756523 -33.808697
 6 1970-01-01 12:00:30 -0.3120 1.0686 0.2652 0.261719 -0.289062
 0.246094 -40.347828  24.626087 -40.347828

 That reading is quite far off, a more accurate reading should be:
 sensor[,1] - as.POSIXct(sensor[,1]/1000, origin='1970-01-01 12:00:00')
 head(sensor)
            logged_on    accx   accy   accz compassx  compassy
 compassz      gyrox      gyroy      gyroz
 1 2012-01-15 05:17:08 -0.4602 0.8346 0.0936 0.145508 -0.350586
 0.259766  59.617390  28.521740  59.617390
 2 2012-01-15 05:17:08 -0.4212 1.0452 0.1326 0.219727 -0.321289
 0.241211  88.695656  27.478260  88.695656
 3 2012-01-15 05:17:08 -0.2496 1.3416 0.2886 0.214844 -0.326172
 0.141602  29.565218 -14.747826  29.565218
 4 2012-01-15 05:17:08 -0.3276 1.0374 0.0546 0.261719 -0.314453
 0.243164   8.765218  16.556522   8.765218
 5 2012-01-15 05:17:08 -0.3588 1.0686 0.2418 0.229492 -0.307617
 0.212891 -33.808697  35.756523 -33.808697
 6 2012-01-15 05:17:08 -0.3120 1.0686 0.2652 0.261719 -0.289062
 0.246094 -40.347828  24.626087 -40.347828

 But now the fractional seconds are missing... Help? -- H
 --
 Sent from my mobile device
 Envoyait de mon portable

 1. https://stat.ethz.ch/pipermail/r-devel/2009-March/052621.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] Logrithmic histogram?

2012-01-22 Thread Hasan Diwan
On 22 January 2012 19:29, Kevin Burton rkevinbur...@charter.net wrote:
 I have some data where the frequency is heavily weighted on the lower end.
 So I have lots of low values with very few higher values. I would like to
 find breakpoints that cover the data with as much detail as possible. I find
 that if I use hist() to automatically find the breaks for me it finds breaks
 that are too coarse for the low values. I have tried the other algorithms
 (like 'Scott' and 'FD') but I have been unable to get it to work for me. I
 think I need breaks based on the inverse logarithm of the frequency so that
 the low values which have a high frequency are more or less evenly
 distributed about like the lower frequency high values. Is there a function
 to find the breaks like this?
Using ggplot2:

require(ggplot2)
data(diamonds)
qplot(carat, data = diamonds, geom = histogram,log='xy')
-- 
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   >