[R] plot circles where z values are circles radius

2015-01-23 Thread Dr. Alireza Zolfaghari
Hi there, I am trying to plot z values using Circle symbol. Each x and y has a value which will be plotted using a circle where circle's radius is corrlated with the value of z. I wrote the code , but unable to change the size of circle no matter what I chose for Scale. Any help please? x=c(84390

[R] plot in one unique x,y axis

2015-01-25 Thread Dr. Alireza Zolfaghari
Hi there, does any one know how to plot the both d1 and d2 data in one unique x and y axis? thanks Alireza convertToRadius<-function(x){return(sqrt(x/pi))} myd=data.frame(x=c(84390255386 ,74390255386, 78028317380 ,53594648044,422) ,y=c(949849442 ,941645043, 840135292, 74, 821632

[R] Fetch large sized file from SQL

2009-10-02 Thread Dr. Alireza Zolfaghari
Hi List, Does any one know what package I need to use in order to fetch/get a large sized dataframe from SQL? I have already used sqldf package which is good for fetching large sized csv files. Thanks Alireza [[alternative HTML version deleted]] __

Re: [R] Fetch large sized file from SQL

2009-10-02 Thread Dr. Alireza Zolfaghari
ing it with the postgresSQL driver in the past, > because of some apparent incompatibility with the native postrgesSQL ODBC > driver. I think the problem where solved by the new ODBC driver for > postgresSQL and the new revision for RODBC. > > On Friday 02 October 2009 13:56:02 Dr. Al

[R] beta

2009-05-06 Thread Dr. Alireza Zolfaghari
Hi List Can you tell me how I can get the probability of L>=2.5 when the mean is 5.5 and á = 2.28409 and â = 6.09091? using beta function indeed? regards, [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.et

[R] rlnorm(n, meanlog = 0, sdlog = 1)

2013-05-10 Thread Dr. Alireza Zolfaghari
Hi list, Does anyone know the code behind rlnorm(n, meanlog = 0, sdlog = 1)? I am going to write it in c#. thanks Alireza [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLE

[R] SP package

2013-06-25 Thread Dr. Alireza Zolfaghari
Hi list, I would like to write the function [R_point_in_polygon_sp] in c# as I found it a very efficiently written code due to its high speed calculation. I queried the function name by using sp::point.in.polygon, but could not get source code. Would someone let me know how to get the source code p

[R] How to write R package

2012-09-27 Thread Dr. Alireza Zolfaghari
Hi List, Would you please send me a good link to talk me through on how to write a R package? thanks Alireza [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read t

[R] SQL via RODBC

2012-10-26 Thread Dr. Alireza Zolfaghari
Hi list, Is there a way to use sqlQuery function where there is a sql file (ie. sample.sql)? I just want to mention that in my sql file there are some comment lines (starting with --). This means that if I paste all the lines in the sql file, I'll come up with a long string that most part of it is

[R] time series

2010-09-27 Thread Dr. Alireza Zolfaghari
Hi list, I have a set of data which I want to use time series analysis in R in order to forecast the value for future. I know there are some R functions, but not sure how to use them. Would you please help me if you are familiar with time series in R? I want to get value for Nov 2012 using the foll

[R] function: colvolve

2010-11-01 Thread Dr. Alireza Zolfaghari
Hi list, I have a problem to solve which I believe I shoudl use the convolve to solve it, but I could not figure out how to do it. I got mydata, which is a dataframe which has 7 locations, each location has a longitude,latitude and a value. considering a step of 0.5 degree for longitudes and latitu

[R] sapply

2010-11-08 Thread Dr. Alireza Zolfaghari
y=sapply(1:nrow(x), function(i) sapply(1:ncol(x), function(j) getrc(i, j))) Arvin Zolfaghari, Ph.D. Aon Benfield | Aon Benfield Analytics 55 Bishopsgate, London, EC2N 3BD, UK t: +44 20 7522 8241 | f: +44 20 7522 3846| M: +44 78 8940 6637 e: arvin.zolfagh...@aonbenfield.com | w:

[R] qbeta

2011-02-22 Thread Dr. Alireza Zolfaghari
Hi List, Does any body know how I can see the code behind qbeta function? thanks Alireza [[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 htt

[R] R and Android

2011-03-02 Thread Dr. Alireza Zolfaghari
Hi List, Is anybody aware of any R console available for Android mobile? I know that there is one for Iphone. thanks, Alireza [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] rodbc error

2011-03-10 Thread Dr. Alireza Zolfaghari
Hi list, I have code which reads data from sql server using RODBC in R version 2.12.1. The code used to be ok, till today when I get the following error. The data does not have any problem, but if I run the code in differnt pc, it runs till different number of trial then it fails, for example on on

[R] RExcel

2011-08-10 Thread Dr. Alireza Zolfaghari
Hi list, I used to work with RExcel in excel 2003. Now in 2007, I tried the same RExcel, but it did not work. I got R version 12. I downloaded/installed the latest version of RExcel 3.2.0 from http://sunsite.univie.ac.at/rcom/. It has added the RExcel add-ins, but when I click on starting R in add-

[R] plotting on map

2009-03-02 Thread Dr. Alireza Zolfaghari
Hi list, I want to plot state Texas using map function. I wrote the following code to plot the grid boundary for Texas: library(maps) require("mapproj") longlatLimit<-c(-106.65, -93.53 , 25.93 , 36.49) par(plt=c(0,1,0,1),cex=1,cex.main=1) #Set plotti

[R] R-help

2009-03-02 Thread Dr. Alireza Zolfaghari
Hi list, When I type my question in R console using ? sign (example: ?par, when I want to query for par), the following error message popps up: Error in print.help_files_with_topic("C:/PROGRA~1/R/R-24~1.1/library/maps/chm/map") : CHM file could not be displayed I appreciate if any body c

[R] Map

2009-03-04 Thread Dr. Alireza Zolfaghari
Hi list, I dont know why the top of map gets truncated: I appreciate if any one give me a solution. filename="C:\\temp\\test.pdf" pdf(file=filename, width=15, height=10) library(maps) require("mapproj") longlatLimit<-c(-106.65, -93.53 , 25.93 , 36.49) par(plt=c(0,1,0,1),cex=1,cex.main=1) #Set

[R] Problem in Map function

2009-03-06 Thread Dr. Alireza Zolfaghari
Hi list, I have a real problem with plotting US state map. When I try to plot the northern state, there will be some blank space in the top of graph (see case 1 example), and when I plot southern states, there will be a blank space in the bottom of plot (see case 2). I spent almost 2 days to figure

[R] Map using projection

2009-03-12 Thread Dr. Alireza Zolfaghari
Hi list, I have a real problem with plotting US state map. When I try to plot the northern state, there will be some blank space in the top of graph (see case 1 example), and when I plot southern states, there will be a blank space in the bottom of plot (see case 2). I spent almost 2 days to figure

Re: [R] Map using projection

2009-03-17 Thread Dr. Alireza Zolfaghari
Thanks Ray On Thu, Mar 12, 2009 at 11:01 PM, Dr. Alireza Zolfaghari < ali.zolfagh...@gmail.com> wrote: > Hi list, > I have a real problem with plotting US state map. When I try to plot the > northern state, there will be some blank space in the top of graph (see case > 1 example

[R] xyplot, the first tick mark starts from 2 rather than 1, and also there is a NA as the final tick mark.

2008-10-30 Thread Dr. Alireza Zolfaghari
I am trying to plot some data, but have got some difficulties with labels on the tick marks on the x-axes. There are 20 data points. All I want to do is to plot the Loss versus Lines. When I use xyplot, the first tick mark starts from 2 rather than 1, and also there is a NA as the final tick mark.

[R] How to create margin area around a graphic made by xyplot

2008-11-04 Thread Dr. Alireza Zolfaghari
Hi list, Does any body know how I can create a margin area around the graphic created by xyplot (the same thing we do using par in plot function)? I tried viewport, but does not work. Here is the code: == require(grid) vp<- viewport(x=.1,y=.1,width=.6,h

[R] Linear regression

2008-11-12 Thread Dr. Alireza Zolfaghari
Hi List, Does anybody know what function I need to use for a simple regression? Here is the data: I want to find the value for x1=3.5 data<-data.frame(x=c(1:30),Value=c(31:60)) x1<-3.5 Regards, Alireza [[alternative HTML version deleted]] __ R

[R] Date conversion

2008-11-13 Thread Dr. Alireza Zolfaghari
Hi List, If I have a date format as: d <- "2001/1/1" I can easily convert it to number by using as.Date(d). But if I have d<-"1/1/2001", it does not work. Does anyone know how I can convert it using pre-written function in R? Regards, Alireza [[alternative HTML version deleted]] ___

[R] Second y-axis

2008-11-26 Thread Dr. Alireza Zolfaghari
Hi list, In the following code, how can I place the percentage label away from numbers in the second y-axis (lets say all should be inside plot area)? Thanks Alireza = require(grid) vp<- viewport(x=.1,y=.1,width=.6,height=.6,just=c("left", "bottom")) pushViewport(vp) plotDATA=data

[R] How can I create transparant colour

2008-12-04 Thread Dr. Alireza Zolfaghari
Hi list, Does any one know how I can make the red colour transparant? # par() #Set up blank plot to remove plot border type lty="n" xvalue1<- c(1,2,2,1) xvalue2<- c(1,3,3,1) yvalue1<- c(0,0,22,22) yvalue2<- c(0,0,44,44) plot(c(min(xvalue2),max(xvalue2)),c(min(yvalue2),max(y