Re: [R] ggplot barplot error

2014-05-15 Thread Vikram Bahure
al dates rather than the given dates, > and perhaps to change the date format since the year is common, here > is one way to do it: > > #--- > # Convert to Date format so that we can plot by actual date > DF$Date <- as.Date(as.character(DF$Date)) > > # Need scales package

[R] ggplot barplot error

2014-05-15 Thread Vikram Bahure
ity", "Equity", "Equity",* * "Equity", "Debt", "Debt", "Debt", "Debt", "Debt",* * "Debt", "Debt")* *data <- cbind(Date,Flows,Category)* *## GGplot* *ggplot

[R] Blur and not readable text, using geom_text in ggplot

2013-09-01 Thread Vikram Bahure
Dear R Users, I am new to ggplot. I am using geom_text to inscribe values on my ggplot but it is giving me values which are unreadable and blur. Please let me know if there is any way out. - Code - *es <- es3 + geom_text(data=tmp.cor, aes(x=2, y=min(infer.df$value

Re: [R] Converting character to numeric: Error: (list) object cannot be coerced to type 'double'

2012-12-07 Thread Vikram Bahure
; > Hope this helps, > Rui Barradas > Em 07-12-2012 14:23, Vikram Bahure escreveu: > >> Dear R users, >> >> I am facing a pretty a unusual problem while converting character to >> numeric. Any input would be appreciated. >> >> Below is the code and

[R] Converting character to numeric: Error: (list) object cannot be coerced to type 'double'

2012-12-07 Thread Vikram Bahure
Dear R users, I am facing a pretty a unusual problem while converting character to numeric. Any input would be appreciated. Below is the code and error faced: --- *> str(cmie.dts)* *'data.frame': 4397 obs. of 1 variable:* * $ INE001A01036: chr "1482181740.000

[R] Yahoo/Google quotes symbols

2012-06-12 Thread Vikram Bahure
Dear R users, I was working on get.hist.quote to download data, but for this I need to know yahoo quotes (for stocks) from the beginning. Is there any simple way to get all symbols for particular market or I have to go on the website and get the quotes. Thanks for your help in advance. Regards V

[R] subset daily to monthly in a zoo or xts

2012-04-23 Thread Vikram Bahure
Dear R users, I want to subset a daily zoo series according to its month, find % of "NA" in each month. I am finding it difficult to subset the daily dataset into monthly for the given operation.I am planning to do this for a huge dataset. Thanks in advance. Regards Vikram [[alternativ

[R] Remove space from string

2012-01-13 Thread Vikram Bahure
Dear R users, I have some trivial query. I have a string, I want to remove space from the string. For eg. Input: a <- " Remove space " Output required: "Removespace" I tried using str_trim but only removes end spaces. library(stringr). Regards Vikram [[alternative HTML version delet

[R] boot.ci: [Error: cannot allocate vector of size 1.5 Gb]

2011-12-19 Thread Vikram Bahure
Dear R users, I am getting following error while using boot.ci. I have int.inc function with 2 values. I am generating CI for the sample estimate. *> med <- function(x,i) median(x[i])* *> b1 <- boot(int.inc,med,2)* *> ci.out <- boot.ci(b1,conf = c(0.95),type = c("bca"))* *Error: cannot

[R] Boot: Confidence Interval

2011-12-19 Thread Vikram Bahure
Dear R users, I have a very simple query. I am using bootstrap (library(boot)). I want to access the std. error in the results and further generate confidence interval(CI) for n no. of samples which will give me n values for std. error and CI. * * b1 ORDINARY NONPARAMETRIC BOOTSTRAP Call: boot(

[R] matching using "which"

2011-12-08 Thread Vikram Bahure
Dear R users, I have a very simple query. I am using the following command, which should give me row no. for the matching colnames. It works well for matching the colnames but if there is no column matching it gives me outcome as integer(0) which I am not able to use in further calculation. It wo

[R] Plotting a zoo object: lines and barplot

2011-11-28 Thread Vikram Bahure
Dear R users, I have 3 columns in a zoo object. I want to plot all of them in one screen but I want the first two to be in "lines" format and 3rd one to be barplot. Regards Vikram [[alternative HTML version deleted]] __ R-help@r-project.org m

[R] Superimpose two graphs

2011-11-27 Thread Vikram Bahure
Dear R users, I want to superimpose two graphs as well as ensure that they should have same scale with same x & y axis. I am using following command but it does not ensure same scale. *pdf(file = "../RESULTS/RS1.simulated.pdf", width = 10, height =6)* *plot(Reserves.RS, col = 1:2, screen = 1)* *

[R] system.time

2011-11-27 Thread Vikram Bahure
Dear R users. I wanted to know, how do we read the output of system.time. It would be helpful if you could let me know what are user system and elapsed. Regards Vikram [[alternative HTML version deleted]] __ R-help@r-project.org mailing list h

[R] Exclude NA while summing

2011-11-17 Thread Vikram Bahure
Dear R users, I am new to R and have some query. I am having a dataset with binary output 0's and ones. But along with it it has NA's too. I want to sum all the rows and get the sum total for each column. But whenever there is a NA in an row the sum of the row is returned as NA so I am not able

[R] Test Case for Package

2011-10-19 Thread Vikram Bahure
Hi, I had a query for writing a test case for a package. If we are testing a function then do we need to call that function for testing; library(mypackage)? Is that any circular logic any way. For eg. if I create a package mypackage, can I have a file mypackagetest in the tests directory whose l

[R] Code behind the Function

2011-10-18 Thread Vikram Bahure
Hi, I am a new user in R. I wanted to study the code for some R commands. For example, as I was studying PCA analysis there is a command in R, as "princomp". Normally if we type the command we get the code behind the function, but I am not able to get for this one. *> princomp function (x, ...)

Re: [R] Converting factor into date

2011-10-10 Thread Vikram Bahure
Newmiller The . . Go Live... > DCN: Basics: ##.#. ##.#. Live Go... > Live: OO#.. Dead: OO#.. Playing > Research Engineer (Solar/Batteries O.O#. #.O#. with > /Software/Embedded Controllers) .OO#. .OO#. rocks...1k > --

[R] Converting factor into date

2011-10-10 Thread Vikram Bahure
Dear R users, I have an elementary query. I have a dataset which is taken from text file with the help of read.csv command but when I generate the data in R file it converts the Dates into factor.So for the above problem, I use as.Date to convert the Dates from factor form to date format using th

[R] Disabling Auto-complete

2011-09-26 Thread Vikram Bahure
Hi, I am a new user to R. I am having the following problem while using R: The defined function is having following a$unit as input but if I define a$unit1 then still I am getting the output which is not desired. __ *Function:* testfunction<-function(a){ stopifnot(a$unit==

[R] Testing packages

2011-09-23 Thread Vikram Bahure
Dear R users, It would be really helpful if I got to know the names of the packages which use the following for testing: >pkg-Ex. Rout.save files (examples of testing) If possible some testing links: to see how testing is done. Thanks in advance. Regards Vikram [[alternative HTML vers

[R] Strucchange gbreakpoints

2011-09-21 Thread Vikram Bahure
Hi, I am a new user to R. I am using strucchange to generate breakpoints: -- > res <- gbreakpoints(GDP.new ~ 1,data=a,h=2,breaks=5) > print(res) Optimal 6-segment partition for `lm' fit: Call: gbreakpoints

[R] Statmath-R-Forge: Request denied

2011-09-21 Thread Vikram Bahure
Dear All, I want to subscribe for Statmath-R-Forge mailing list. But I am getting the following reply and I am unable to subscribe. Any insight on this would be appreciated. Regards Vikram Bahure __ Your request to the Statmath-R-Forge mailing list Subscription request has been

Re: [R] Strucchange generating breakpoints

2011-09-16 Thread Vikram Bahure
"]] >> >> Though without data and a reproducible example I can't guarantee this is >> what you are looking for. More generally, you should look at ?Extract to >> see >> how to get values from R objects. Whatever getting started with R material >> you (sh

Re: [R] estimating Fstats in strucchange

2011-09-14 Thread Vikram Bahure
uments but > rather indices of the object being passed in. This is the source of your > problem: the documentation also suggests that if you pass from a two-value > vector it will work with it as a time series. That might be what you are > looking for as well. > > Hope this helps

[R] Changelog maintenance

2011-09-14 Thread Vikram Bahure
Hi, We are using r-forge to create a package. My query is that how do I keep the change log updated. I created the change log by doing the following: svn log -v>./inst/changelog Also if I do svn add ./inst/changelog and svn commit -m "Adding changelog" then the changelog is one version behind in

[R] Strucchange generating breakpoints

2011-09-14 Thread Vikram Bahure
1960 1969 1975 1983 1994 2003 --- It would be helpful if you can throw some light on how to access the data stored in the breakpoints result instead of manually accessing it. Regards Vikram Bahure [[alternative HTML v

[R] estimating Fstats in strucchange

2011-09-13 Thread Vikram Bahure
Hi, I am new to R. It would be kind if I could get some help on this. I am using R to estimate Fstats but I am getting following error. a3 is annual GDP data from 1951 to 2010. > fs<- Fstats(ecm.model, from=1954, to = 1975,data=a3) Error in Fstats(ecm.model, from = 1954, to = 1975, data = a3)