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 b

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

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 te

Re: [R] Issues when Trying to Install Packages in R

2018-06-11 Thread Hasan Diwan
Paul, install.packages('lubridate', type='source', repos='https://cran.rstudio.com') # worked for me You should be able to copy/paste the line into an R session. -- H -- OpenPGP: https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1 If you wish to request my time, please do so us

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 y

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 te

Re: [R] A question on Statistics

2018-06-30 Thread Hasan Diwan
Christofer, On Sat, 30 Jun 2018 at 12:54, Jeff Newmiller wrote: > > You should use Stack Exchange for questions about statistics. Specifically, https://stats.stackexchange.com/ -- H -- OpenPGP: https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1 If you wish to request my time,

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

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 an

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

Re: [R] RJDBC

2017-05-02 Thread Hasan Diwan
Anthony, Did you try options(java.parameters = "-Xmx8g -Djava.oracle.jdbc.timezoneAsRegion=false") instead of specifying the java property separately? -- H On 2 May 2017 at 15:18, Nelson Anthony wrote: > Hi all, > > > > I am trying to connect to Database using RJDBC but due to some DB & Server

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

Re: [R] Post for R

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

Re: [R] How export data set (available in the package) from R?

2017-07-29 Thread Hasan Diwan
write.csv(flchain, 'flchain.csv') should import into Excel without problems. -- H On 29 July 2017 at 23:27, Jeff Newmiller wrote: > Read the help file for the survival package. Probably use the data > function to retrieve it, and write it out using the write.table function. > -- > Sent from my

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

Re: [R] converting Twitter data from txt file

2015-04-22 Thread Hasan Diwan
On 22 April 2015 at 13:05, Erin Hodgess wrote: > Hello! > > Someone gave me a text file of Twitter data to look at. I've used the > twitter package to do the actual downloading and getting the data into nice > R form. > > Is anyone familiar with a function to convert the twitter text into that >

Re: [R] Fitting a Tweedie distribution

2015-01-02 Thread Hasan Diwan
The tweedle package[1] claims to have "functions for computing and fitting the Tweedie family of distributions". Hope that helped. -- H 1. http://cran.r-project.org/web/packages/tweedie On 2 January 2015 at 10:33, Paul Hudson wrote: > Hello all, > > I want to fit a tweedie distribution to the da

[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]] _

Re: [R] how to draw paired mosaic plot?

2015-02-06 Thread Hasan Diwan
The stats package has a mosaicplot function. Perhaps that would help? -- H On 6 February 2015 at 03:46, meng wrote: > Hi all: > If there are two numeric variable:x,y, and I can get paired scatter plot > by function "pairs".But if x and y are character, and I want to get paired > mosaic plot,whic

Re: [R] How many digits are there in left of dot of 0.0001 ?

2015-02-25 Thread Hasan Diwan
On 25 February 2015 at 17:55, ce wrote: > Dear all, > > I would like to count how many digits are there on the left of a the dot > of a numeric variable > Left? An infinite number... What does this have to do with R, though? -- H > > a=0.0001 > > thanks > > _

Re: [R] How many digits are there in left of dot of 0.0001 ?

2015-02-25 Thread Hasan Diwan
answer I want would be 1 , > > -Original Message- > From: "Hasan Diwan" [hasan.di...@gmail.com] > Date: 02/25/2015 09:28 PM > To: "R Project Help" > Subject: Re: [R] How many digits are there in left of dot of 0.0001 ? > > On 25 February 2015 at 1

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

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 > softwar

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 o

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 > d

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 spe

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 ha

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-h

Re: [R] Problem with assignment 1 part 1

2014-08-10 Thread Hasan Diwan
We can try, but we're not going to be able to do much without the code being pasted in the email. -- H On 10 August 2014 19:08, michelle maurin wrote: > I think my code is very close I can seem to be able to debug it Might be > something very simple I know the problem is on the last 3 lines of

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 Mi

Re: [R] How to download this data

2015-08-25 Thread Hasan Diwan
If there's no api available, I would use selenium to grab what I need and pipe it to R. Let me know if you need further assistance. Cheers! -- H On Aug 25, 2015 11:12 AM, "Christofer Bogaso" wrote: > Hi, > > I would like to download data from below page directly onto R. > > > http://www.nseindia.

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

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 th

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

Re: [R] R-help mailing list activity / R-not-help?

2016-01-25 Thread Hasan Diwan
On 25 January 2016 at 13:13, Duncan Murdoch wrote: > On 25/01/2016 3:33 PM, Hasan Diwan wrote: > >> There exists a fine line between being unintentionally rude, but helpful >> and purposely putting someone down. -- H >> > > I'm afraid I don't think your po

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 ? > >

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

Re: [R] Beginner problem - using mod function to print odd numbers

2021-06-04 Thread Hasan Diwan
unlist(sapply(seq(1,100), function(n) { if(n %% 2) n })) yields: [1] 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 [26] 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 As for why your solution isn't working, if you'd like me to take a close

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

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 t

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://

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 > termi

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

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-

Re: [R] R 3.6.1 is released

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

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

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 th

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 h

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

Re: [R] Off-topic? Linux laptop for R

2013-08-11 Thread Hasan Diwan
Any laptop that performs well with Linux will perform acceptably with R and vice versa. -- H On 11 August 2013 11:03, Mitchell Maltenfort wrote: > Can anyone recommend a laptop that performs well running R under Linux? > Thanks. > > [[alternative HTML version deleted]] > > _

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

2012-12-24 Thread Hasan Diwan
Eliza, On 24 December 2012 08:34, eliza botto wrote: > > Dear R family,i am trying to plot and save, simultaneously, about 1000. > the name of each plot is contained in "names" file. when i run this loop, i > get an error. > "Error in plot.new() : Unable to open file > 'C:/R/SAVEHERE/myplot_Ta

Re: [R] Converting Date to Unix Time

2013-02-01 Thread Hasan Diwan
Mr Isella, On 1 February 2013 05:37, Lorenzo Isella wrote: > How can I convert that into Unix time? format.POSIXct(dateCol, '%s'); -- H -- Sent from my mobile device Envoyait de mon portable __ R-help@r-project.org mailing list https://stat.ethz.ch/m

[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

Re: [R] how to change "`Year_Month)201103`" into "Year_Month)201103" using R?

2013-03-14 Thread Hasan Diwan
On 14 March 2013 01:56, Marc Girondot wrote: >> cat(gsub("`", "", x)) might want to add fixed=TRUE to the gsub line. -- Sent from my mobile device Envoyait de mon portable __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] Spider Plot

2013-04-19 Thread Hasan Diwan
install.packages('psych', repos='http://cran.rstudio.com', dep=TRUE) require(psych) spider(y=1,x=2:9,data=Thurstone) On 19 April 2013 22:29, XINLI LI wrote: > Does any one have a sample code for a Spider Plot as attached? > > Thanks, > > Xing > > __

Re: [R] Manhattan Plot

2013-04-27 Thread Hasan Diwan
Just because it is possible to make a plot, doesn't mean it's a good idea. It would depend on what you're trying to show. -- H On 27 April 2013 17:21, lw...@yahoo.com wrote: > Hi, Tenfei, I have two group of data composed of gene mutation and > deletion on specific sites. Will it be possible f

Re: [R] KalmanForecast (stats)

2013-07-01 Thread Hasan Diwan
On 1 July 2013 19:24, Giovanni Petris wrote: > Could you send me a simple example of KalmanForecast (with input data) that I > can run and can see how it works exactly? There's an explanation of the Kalman Filter available at http://www.swarthmore.edu/NatSci/echeeve1/Ref/Kalman/ScalarKalman.html

Re: [R] add lowess predicted line to scatter plot

2012-09-24 Thread Hasan Diwan
Instead of attachments, put the out On 24 September 2012 01:58, Maximilian Lklweryc wrote: > Hi, > I have a scatter plot of the variables GNI and Lifeexp (Gross National > Income and Life Expectancy, both metric). So I plotted them and I want to > add a regression line and a lowess line. I use lo

Re: [R] Mac Text editors

2012-09-27 Thread Hasan Diwan
On 27 September 2012 09:26, peter dalgaard wrote: > (I gather that .emacs functionality ends up in > ~/Library/Preferences/Aquamacs\ Emacs/* . You're not really expected to > bypass the menus, though.) > ~/.emacs, same place as on Linux. -- Sent from my mobile device Envoyait de mon portable

Re: [R] Class for time series

2012-10-04 Thread Hasan Diwan
Mr. Emmanuel, On 4 October 2012 02:43, Poizot Emmanuel wrote: > Dear all, > > I have a time serie dataset such as the following with data acquired every > 15 minutes: > > DateHeure Profondeur Température Salinité Turbidité Chloration > 1 2012-07-06 08:47:22 -0.144 22.4690.011

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 a

Re: [R] Update CSV file content

2012-10-08 Thread Hasan Diwan
Mr Akkara, On 8 October 2012 05:20, Rantony wrote: > > Here i have a csv file, it contain like this > > NAME UPDATED > - -- > ABCINDIA > XYZ UK > > My requirement what is, i need to change the value inside the csv file > (instead of INDIA i need to make it

Re: [R] Convert COLON separated format

2012-10-08 Thread Hasan Diwan
Mr Silverman, On 9 October 2012 00:56, Noah Silverman wrote: > I have a bunch of data sets that were created for the libsvm tool. They > are in "colon separated sparse format". > Is there a simple way to do this? > Use read.table with a sep of ':' and let me know how you get on. -- H -- Sent

Re: [R] gumbel distribution

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

Re: [R] how to remove outliers

2014-07-14 Thread Hasan Diwan
Marta, To remove a row from your data frame, use: value <- 14478.4 time <- time[-time[$TimeDiff] == value,] I hope that helps... If not, do push back. -- H On 14 July 2014 09:17, Marta valdes lopez wrote: > Hi! > > I did this test and I got this outlier that i would like to remove the > whole

Re: [R] Java Exception error while reading large data in R from DB using RJDBC.

2012-11-01 Thread Hasan Diwan
Sir, On 30 October 2012 04:32, aajit75 wrote: > > Please suggest where am i going wrong or alternate option to solve such > issues while reading large DB table. > You might consider setting the fetch size. I haven't used RJDBC in a few months, but hopefully, the hints on http://www.rforge.net/

Re: [R] Java Exception error while reading large data in R from DB using RJDBC.

2012-11-01 Thread Hasan Diwan
On 1 November 2012 11:47, Hasan Diwan wrote: > Sir, > > On 30 October 2012 04:32, aajit75 wrote: >> >> Please suggest where am i going wrong or alternate option to solve such >> issues while reading large DB table. >> > > You might consider setting th

[R] map.market - font customisation

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

[R] strucchange package Linux help

2011-05-18 Thread Hasan Diwan
When I run the code below on Macintosh and Windows, the plot comes out fine. However, on Linux, the png generated is invalid from R console, and loading strucchange crashes rkward. Is this a known issue on Linux and, if so, is there a workaround? Many thanks! require(strucchange) data("RealInt") bp

[R] Rjdbc dbGetquery execution error

2011-02-16 Thread Hasan Diwan
Rjdbc consistently gives me an execution error with postgresql 9.0s JDBC4 driver. It's probably something trivial so am including my code below: library("RJDBC") param <- 249 param2 <- 188129 postgres <- JDBC("org.postgresql.Driver", ".m2/repository/postgresql/postgresql/9.0-801.jdbc4/postgresql-9

[R] RCurl HTTP Post ?

2011-02-17 Thread Hasan Diwan
= curlOptions=(userpwd="test:test", verbose=T), profileid = "-1", value="1.801", type="history"). The page instance shows the HTTP response 500 screen and I get a nullpointerexception in the server logs. The line it points to is dealing with getting an integer out

Re: [R] RCurl HTTP Post ?

2011-02-22 Thread Hasan Diwan
ST request is submitted, either application/x-www-form-urlencoded or multipart/form-data. Your server script might be expecting the data in a different format than is being sent. postForm() defaults to the www-form-urlencoded. But we will need more information to help you if these

[R] RCurl Post

2011-02-25 Thread Hasan Diwan
gt; Content-Type: application/x-www-form-urlencoded > < HTTP/1.1 201 Created < Date: Fri, 25 Feb 2011 19:41:51 GMT < Content-Length: 0 < Server: Jetty(6.1.25) < * Connection #0 to host our.db.host left intact * Closing connection #0 All I want to do is duplicate the curl command&#

[R] How do I make this faster?

2011-04-09 Thread Hasan Diwan
I was on vacation the last week and wrote some code to run a 500-day correlation between the Nasdaq tracking stock (QQQ) and 191 currency pairs for 500 days. The initial run took 9 hours(!) and I'd like to make it faster. So, I'm including my code below, in hopes that somebody will be able to figur

Re: [R] count number of TRUEs in each row

2011-04-10 Thread Hasan Diwan
Ms Qiao, On 10 April 2011 14:24, Wendy wrote: > I have a huge matrix of TRUE/FALSE table like following, and I want to > count > the number of TRUEs in each row. Instead of looping through each row and do > length(Z[Z==TRUE]), I am wondering if there is an easier way of doing this. > > [,1

[R] cbind giving NA's?

2011-08-26 Thread Hasan Diwan
I have two xts objects, call them "a" and "b", and am trying to merge them... > class(a) [1] "xts" "zoo" > class(b) [1] "xts" "zoo" > head(a) 2010-04-01 7.6343 2010-04-02 7.6343 2010-04-03 7.5458 2010-04-04 7.4532 2010-04-05 7.4040 2010-04-06 7.3317 > head(b) 2010-04-01 568.80 2010-04-05

Re: [R] cbind giving NA's?

2011-08-26 Thread Hasan Diwan
On 26 August 2011 03:37, R. Michael Weylandt wrote: > If you could, dput() them so we can see everything about them. You also > might see if merge() gives you more expected behavior Ok... > dput(a) structure(c(7.6343, 7.6343, 7.5458, 7.4532, 7.404, 7.3317), class = c("xts", "zoo"), .indexCLAS

Re: [R] r-help volcano plot

2011-09-05 Thread Hasan Diwan
On 6 September 2011 08:01, KnifeBoot wrote: >  Can't installe packag maDB or limma. Which R version, and what platform are you using? -- Sent from my mobile device Envoyait de mon telephone mobil __ R-help@r-project.org mailing list https://stat.ethz.

Re: [R] How download to spreadsheet?

2011-09-11 Thread Hasan Diwan
require(quantmod) getSymbols('IBM', from='2010-01-01') write.csv(Cl(IBM), file='ibm-2010-present.csv') I can open the resulting file in Excel without problems. Depending on your preference, you may want to use write.csv2 instead. On 11 September 2011 06:59, Yumin wrote: >    The result will disp

Re: [R] (no subject)

2012-07-03 Thread Hasan Diwan
On 3 July 2012 22:03, Akhil dua wrote: > and I need to run a seperate regression of every stock on market > so I want to write a "for loop" so that I wont have to write codes again > and again to run the regression... > 1. Do give a subject line -- a blank one is commonly used by a virus. 2. I

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 st

Re: [R] Format Date with Time

2012-07-16 Thread Hasan Diwan
Ms Vogric, as.POSIXct should be able to help there... On 16 July 2012 06:40, Jessica Streicher wrote: > ?Date > ?POSIXct > > and here you can find the formatting symbols: > http://stat.ethz.ch/R-manual/R-patched/library/base/html/strptime.html > > > On 16.07.2012, at 15:26, Lauren Vogric wrote:

Re: [R] Dataset in parts - how to join together?

2011-07-10 Thread Hasan Diwan
region1 <- read.table(file1, header=T) ... region12 <- read.table(file12, header=T) region <- data.frame(rbind(region1, region=1)..., rbind(region12, region=12))) rm(region1, region2, region3..., region11, region12) On 10 July 2011 12:22, majesty wrote: > Hello, I am new to R - could somebody sug

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

Re: [R] How to write % in pie chart?

2012-08-12 Thread Hasan Diwan
Post yer code and I'd be happy to take a look. On Aug 11, 2012 10:57 PM, "Manish Gupta" wrote: > HI, > > I am plotting one pie chart and need to write % inside it. How can i write > % > inside it as show in figure below. > > http://r.789695.n4.nabble.com/file/n4640078/pie_chart.png > > Regards >

Re: [R] to clear combobox value....

2012-08-26 Thread Hasan Diwan
Punitha, On 26 August 2012 02:43, punitha wrote: > but i am not knowing what should be written in the command function of a > button, so that the selected value of combobox should be cleared or come > back to its default value > http://www.tkdocs.com/tutorial/widgets.html there's code here

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

Re: [R] How can I export a big data.frame to excel 2010 - file.xlsx?

2012-09-04 Thread Hasan Diwan
Ms. Botrel, On 4 September 2012 13:52, PamelaBotrel wrote: > I need some help to export a data frame with 83 rows and 1411 colums. I > have > used the package RODBC until now. But now, I have 1411 colums that I can't > send to the old excel. If anybody knows a package to convert my data frame >

Re: [R] how to save a heatmap.2 in png /jpeg /tiff

2012-09-09 Thread Hasan Diwan
Mr Stadler, On 9 September 2012 10:36, Fred wrote: > But I don't have any files called "heatmap.2.png " on my computer. > I really don't understand why I don't get anything ! > What does getwd() print out as a path? Check there for the your file. -- H -- Sent from my mobile device Envoyait de

Re: [R] install.package tseries

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

Re: [R] Suggested alternative to rgdal for Mac for making bubble plots with R 2.14?

2011-11-22 Thread Hasan Diwan
Mr Rupert, On 23 November 2011 02:32, Jason Rupert wrote: > Thanks for any suggested current alternative methods for creating bubble > plots in R 2.14. http://sas-and-r.blogspot.com/2010/09/example-85-bubble-plots-part-3.html cat = rep(c(1, 2, 3), each=20) abscissa = rnorm(60) ordinate = rnorm

Re: [R] Time series merge?

2011-11-26 Thread Hasan Diwan
Try xts (tsObj, order.by=index (tsobj)) On Nov 26, 2011 10:57 AM, "Kevin Burton" wrote: > I have two time series > > > > a <- ts(1:10, start=c(1,6), end=c(2,5), frequency=10) > > b <- ts(1:5, start=c(2,1), end=c(2,5), frequency=10) > > > > Obviously 'b' is a subset of 'a'. I want a single index v

[R] dismo help

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

[R] Weird Excel Time Format

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

Re: [R] Weird Excel Time Format

2011-11-29 Thread Hasan Diwan
On 29 November 2011 09:32, Prof Brian Ripley wrote: > If all else fails, read the help page.  There are examples on ?as.Date of > reading Excel dates. I did, it seems there is either (a) a problem with my code, or (b) a problem with the documentation. See below: > rawtimeColumn [1] 39406.577662037

Re: [R] Weird Excel Time Format

2011-11-29 Thread Hasan Diwan
On 29 November 2011 10:26, Jeff Newmiller wrote: > You haven't indicated how you are accessing the Excel file, or whether it is > an XLS or XLSX file. It sounds like you might be using rcom or a dependent > package, in which case you may need to read the Excel COM interface > documentation more

Re: [R] Reg : Using RJDBC to read UTF-8 characterrs

2011-12-21 Thread Hasan Diwan
Mr Sankaran, It may be your character set that's wrong or check your MySQL configuration. On Dec 21, 2011 12:31 AM, "Raji" wrote: > Hi All, > > We are using the following dataset which contains UTF-8 characters and is > stored in a MySQL database. When we use > RODBC and read the data, the chara

[R] Optimising timeboxing in xts

2011-12-23 Thread Hasan Diwan
I don't know if timeboxing is the correct term to use to accomplish what I'm attempting, so allow me to explain. I have a set n of tagged observations in time series t. What I'm interested in is taking i seconds before and after every n. My code is below: # observations.xts is an xts time series an

Re: [R] [R-SIG-Finance] Removing outliers in tick data in R?

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

Re: [R] Changing X axis of ggplot

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

  1   2   >