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 juta.kawalerow...@stx.ox.ac.uk wrote: Hello, I am

[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

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

2011-04-10 Thread Hasan Diwan
Ms Qiao, On 10 April 2011 14:24, Wendy wendy2.q...@gmail.com 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

[R] cbind giving NA's?

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

Re: [R] cbind giving NA's?

2011-08-26 Thread Hasan Diwan
On 26 August 2011 03:37, R. Michael Weylandt michael.weyla...@gmail.com 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 =

Re: [R] r-help volcano plot

2011-09-06 Thread Hasan Diwan
On 6 September 2011 08:01, KnifeBoot knifeb...@163.com 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

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 zpx...@gmail.com wrote:    The

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

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

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

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

[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

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

Re: [R] Web based R-help not a list

2011-11-09 Thread Hasan Diwan
On 9 November 2011 15:24, Jeff Newmiller jdnew...@dcn.davis.ca.us wrote: Such a resource would no longer be R-help. You might like stackoverflow. Perhaps our man was looking for a searchable mail archive? If no one has one, I can set one up pretty quickly. Just let me know... Thanks in advance!

Re: [R] install.package tseries

2011-11-20 Thread Hasan Diwan
On 21 November 2011 00:14, Joaquim Andrade jandra...@gmail.com 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

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 jasonkrup...@yahoo.com 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 =

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 rkevinbur...@charter.net 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

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

Re: [R] Weird Excel Time Format

2011-11-29 Thread Hasan Diwan
On 29 November 2011 09:32, Prof Brian Ripley rip...@stats.ox.ac.uk 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

Re: [R] Weird Excel Time Format

2011-11-29 Thread Hasan Diwan
On 29 November 2011 10:26, Jeff Newmiller jdnew...@dcn.davis.ca.us 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

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 raji.sanka...@gmail.com 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

[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

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 comtech@gmail.com 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

Re: [R] Changing X axis of ggplot

2012-01-02 Thread Hasan Diwan
Aren, On 2 January 2012 19:34, Aren Cambre a...@arencambre.com 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

Re: [R] RODBC vs gdata

2012-01-09 Thread Hasan Diwan
On 9 January 2012 10:46, Christof Kluß ckl...@email.uni-kiel.de wrote: thank you very much, so it is a known problem with the Microsoft Excel ODBC drivers :( As I was advised a few weeks ago, the best way for Excel to get into R is to export the file as CSV and use read.csv, read.csv2, or

[R] rjava on FreeBSD

2012-01-11 Thread Hasan Diwan
Trying to install Rjava on FreeBSD 9 and am getting the following error: install.packages('rJava') trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/rJava_0.9-3.tar.gz' Content type 'application/x-gzip' length 537153 bytes (524 Kb) opened URL ==

[R] Points inside a polygon

2012-01-11 Thread Hasan Diwan
I have a list of bounds for a series of polygons. I do understand the formula to determine whether point i is within polygon X (X[x1] i[x] X[x2] i[x] X[y1] i[y] X[y2] i[y]), and I can apply this throughout the dataset. However, this naive algorithm doesn't scale very well. The data set

[R] point.in.polygon help

2012-01-13 Thread Hasan Diwan
x - sapply(c(1:max(greens[,1])), function() { poly.x - greens[greens[,1] == hole, 2] poly.y - greens[greens[,1] == hole, 3] p.x - gps[,3] p.y - gps[,4] require(sp) gps[which(point.in.polygon(p.x,p.y,poly.x,poly.y) != 0),ncol(gps)] -

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

[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

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

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

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

[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

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

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

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

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

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

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

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

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

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

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

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

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,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[R] RCurl HTTP Post ?

2011-02-17 Thread Hasan Diwan
, verbose=T), profileid = -1, value=1.801, type=history). The page instance shows the HTTP response 500 screen and I get a nullpointerexception in the server logs. The line it points to is dealing with getting an integer out of profileid. Help? Many thanks in advance... -- Hasan Diwan Developer

Re: [R] RCurl HTTP Post ?

2011-02-22 Thread Hasan Diwan
. -- Hasan Diwan Developer Economic Risk Management LLC [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

[R] RCurl Post

2011-02-25 Thread Hasan Diwan
Server: Jetty(6.1.25) * Connection #0 to host our.db.host left intact * Closing connection #0 All I want to do is duplicate the curl command's output with RCurl. Help? Thanks in advance! -- Hasan Diwan Developer Economic Risk Management LLC [[alternative HTML version deleted

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

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

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

[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

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

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

[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

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

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

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

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

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

[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 many digits are there in left of dot of 0.0001 ?

2015-02-25 Thread Hasan Diwan
. 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

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

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

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

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.

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

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

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

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

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

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

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"), >

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

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

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

  1   2   >