Re: [R] Date as Integer

2015-08-24 Thread Shivi82
Hi John, Sorry but if this sounds really as a newbie question. I looked at the data as you suggested using glimpse(name of the dataset) and then View(dput(head(ak,20))) to capture it as a table. Is there an option where i can save this view table share along. I used dput but that would not

[R] Date as Integer

2015-08-22 Thread Shivi82
Hi All, I am using dplyr package and need to find total bills booked grouped on a date level however my date is integer. In the code below i was trying to change date format from integer. However it is throwing an error: no applicable method for 'group_by_' applied to an object of class

Re: [R] Output In R

2015-08-21 Thread Shivi82
Hi Jim, Please see the sample code: ak-read.csv(June.csv, header = TRUE) ak%%select(sfxcode,mod,chargedweight)%%filter(mod=='AIR') what i am trying to find is selecting the required var and then selecting only AIR as a mode of transportation from mod. I am getting the output but the total rows

Re: [R] Output In R

2015-08-21 Thread Shivi82
Thanks Jeff, this is helpful. The reason i am curious to know this is because I have worked for a long duration in SAS where in it gives us the flexibility to create a data set of our analysis and then we can easily detail out the same to the end user. In R seems like View or Sweave or Shiny

Re: [R] Output In R

2015-08-19 Thread Shivi82
HI Boris, The reason i want to see or show 3 million rows in console is that i need to present it to a business user. So here my end objective is to present the final output to the business user. So lets say when i write a code: select(june,waybill:type,contains(sfxcode)) so here there could be

Re: [R] Output In R

2015-08-19 Thread Shivi82
Hi Loris, I have already tried options(max.print=99) but does not show the desired result. As posted above it want to share the outcome with the business owner where there could be multiple entries. -- View this message in context:

[R] Output In R

2015-08-18 Thread Shivi82
Hello All, As i am a newbie in R so most of you would have seen this question zillion times. I searched for the answer on this forum as well on other various forums however could not find the answer i am looking for. I am dplyr package and used a very basic code: select(june,city,state,mod)

[R] Finding top 25% observations in Dplyr

2015-08-13 Thread Shivi82
Hi All, I am working on a dataset baseball where i am grouping based on one var income in descending order. Now i need to find the top 25% of the observations from the income group for which i used top_n (0.25) but it is not finding the desired. Can you please suggest. Baseball%%

[R] Grouping in R

2015-06-18 Thread Shivi82
Hi All, I am working on a data where the total row count is 25+ and have approx. 20 variables. One of the var on which i need to summarize the data is Consignor i.e. seller name. Now the issue here is after deleting all the duplicate names i still have 55000 unique customer name and i am

[R] Aggregating on date at Monthly Level

2015-06-17 Thread Shivi82
HI All, I have situation where i am aggregating weight on monthly and quarterly level. I need to summarize weight on variable ship date i.e. shipping date . As this date is in a character format so used the conversion as: Shipdate-as.Date(retail$ship.date, format=%m-%d-%Y). But when i see the

[R] Restricting Decimal Places in the Output

2015-06-17 Thread Shivi82
Good Morning All, I have working on a data set where I am finding mean and median for weight variable on a daily basis. The code: aggr-aggregate(retail$weight,list(retail$ship.date),mean) This is giving me an accurate result however with 4 decimal places for the mean weight. In order to

Re: [R] Restricting Decimal Places in the Output

2015-06-17 Thread Shivi82
Hi Petr, The solution you shared worked though it does not show any decimal values. The output is Group.1 x 11/1/2015309450 2 1/10/2015 332780 Instead of mean i used sum i think that should be fine. aggr-aggregate(retail$weight,list(retail$ship.date),function(x)

Re: [R] Missing Values in Table Statement

2015-06-16 Thread Shivi82
HI Petr,There is no reason for holding back the data from dput format. The reason for not supplying is that i tried multiple times but it the output what comes is not really user friendly is what i think.Not sure if i am missing a trick somewhere as i tried both the dput and dget options. Though

Re: [R] Missing Values in Table Statement

2015-06-12 Thread Shivi82
Hi Petr, Please see the output from dget as follows. ORIGIN ORIGIN_NAME DESTINATION DESTINATION_NM RPS_NO VENDOR_NAME CR_DT SCHD_MRKT VHL_NO vhl_cap 1 DLI11DELHI-11 NDA50NOIDA-50 1350760

Re: [R] Missing Values in Table Statement

2015-06-12 Thread Shivi82
Hi Petr, Probably i did not explain my scenario clearly. table(test$ORIGIN_NAME,is.na(test$SCH_TIME)) is the syntax with which i am trying to find per destination wise how many instances are there where system failed to enter the scheduled delivery time there are multiple cases of these. I am

[R] Missing Values in Table Statement

2015-06-12 Thread Shivi82
HI All, I need help on 2 issues as highlighted below A)I have 2 variables:- Sch_Time Origin Name. Now there are multiple instances where Scheduled time i.e. Sch_Time is missing from each location hence i need to count how many instances do i have split on location. the code i have is :

Re: [R] Missing Values in Table Statement

2015-06-12 Thread Shivi82
HI Don, This is the exact result i need. However in my case i am not getting any value under TRUE whereas FALSE captures total observations in each variable. Please find the syntax and output from the code: table(test$ORIGIN_NAME,is.na(test$SCH_TIME)) Output

Re: [R] Summarizing data based on Date

2015-06-11 Thread Shivi82
Thank you John for spending time on this query and helping out. It really helped me and finally i am able to achieve the desired results. Thanks a ton to all others as well to spending time and furbishing solution. Regards, Shivi -- View this message in context:

Re: [R] Summarizing data based on Date

2015-06-10 Thread Shivi82
HI All, I am able to get the desired result. Thanks for extending help. while reading the csv file I made some changes as : Test-read.csv(Testdata.csv, head=TRUE, stringsAsFactors = FALSE, strip.white = TRUE) with this character var were not changed to factors. Then aggregation was simple:

Re: [R] Summarizing data based on Date

2015-06-09 Thread Shivi82
Hi Petr I researched a lot over the net and R manual as well based on which I revamped my code and came to the code as: test$CR_DT - as.Date(test$CR_DT, '%d-%b-%y') iii- aggregate(test$CHG_WT,list(format(test$CR_DT,%m)),FUN=sum) However it still gives me the error as below: Error in

[R] Summarizing data based on Date

2015-06-08 Thread Shivi82
Hi All, I have a data set with 11000 rows 19 columns. I have 2 columns on which I need to summarize the data:- Date Weight. Snapshot is : Date 13/03/2015 31/03/2015 15/03/2015 17/03/2015 17/03/2015 11/3/2015 11/3/2015 19/03/2015 CHG_WT 0 0 0 770 3,730 70 10 500

Re: [R] Summarizing data based on Date

2015-06-08 Thread Shivi82
Hi Petr, Thanks for the explanation below. I tried the code you supplied however it seems as my date is a factor hence it is not working. The error I got from the code was : Error: unexpected symbol in: final-aggregate(test$CHG_WT,list(format(test$CR_DT,%d),sum) final str(test$CR_DT)- gives

[R] Cannot Sum with DDPLY

2015-06-08 Thread Shivi82
Hi All, Kindly see the below code I have used: maxorder-ddply(test, ~ ORIGIN,summarize,Weight=sum(CHG_WT)) Here I have written the code to summarize values based on origin and total weight however I am getting below error: Error: ‘sum’ not meaningful for factors Please advice. I need CHG_WT

[R] Error in CSV file

2015-05-29 Thread Shivi82
Hello All, This is an easy fix but I am not able to find the root cause of the error. I am trying to upload a csv file but it is throwing an error. Have done a lot of research on google and some tutorial but cant find a solution hence please advice:- Syntax is :- aaa-read.csv(file

[R] Help on R Functionality Histogram

2015-05-29 Thread Shivi82
Hello Experts, I have couple of questions on the analysis I am creating. 1) How does R adopt to changes. The case I have here is that the excel I have started initially had to be modified because the data I had was on hourly basis ranging from 0 to 23 hours. After Changes 0 was modified to 24 in

[R] Help on R Functionality Histogram

2015-05-29 Thread Shivi82
Hello Experts, I have couple of questions on the analysis I am creating. 1) How does R adopt to changes. The case I have here is that the excel I have started initially had to be modified because the data I had was on hourly basis ranging from 0 to 23 hours. After Changes 0 was modified to 24 in

Re: [R] Error in CSV file

2015-05-29 Thread Shivi82
This ate my head like for 2 hours. God thanks for the help. -- View this message in context: http://r.789695.n4.nabble.com/Error-in-CSV-file-tp4707879p4707882.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] Help on R Functionality Histogram

2015-05-29 Thread Shivi82
Thanks Sarah. This is magical. Thanks for explaining in such a length. -- View this message in context: http://r.789695.n4.nabble.com/Help-on-R-Functionality-Histogram-tp4707886p4707891.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Help on R Functionality Histogram

2015-05-29 Thread Shivi82
Thanks you Sarah. This was very impressive and really helped me out. -- View this message in context: http://r.789695.n4.nabble.com/Help-on-R-Functionality-Histogram-tp4707886p4707949.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Help on Histogram ~ Barplot

2015-05-28 Thread Shivi82
HI David, So if I understand from your post below, when we import a file in R- we need to make sure that the variable names do not have any space nor they should be in special characters or not in comma format. Please correct me I am wrong. Now I have changed the file to a new file as RData.csv

Re: [R] Help on Histogram ~ Barplot

2015-05-27 Thread Shivi82
HI Jim, Thanks for the help however R throws an error when i create a var tot_mon_wt- tot_mon_wt-by(mwlc$MFST_WT,mwlc$Month,sum). It gives me an error = Error in Summary.factor(c(1L, 1L), na.rm = FALSE) : ‘sum’ not meaningful for factors Not sure what this error refers to. Thank you, Shivi

[R] Help on Histogram ~ Barplot

2015-05-27 Thread Shivi82
Hello All, I need help on creating a histogram for one of my data. The data is as below (sample): MFST_WT Hours PROCESS Month Weekday Day of the Month 6,828 13 INBOUND Mar Fri13 2,504 16 INBOUND Mar Fri27 20

[R] Printing with Header no of observations

2015-05-27 Thread Shivi82
HI Team, A quick question. When I used the print option in R to see the output of my syntax I do not see the headers or column names. Is there a way to see the headers in the print. Also as most of the datasets we work today have huge number of observations but when I print it only shows a

Re: [R] Issues with loading csv file

2015-05-26 Thread Shivi82
Hi Pat, Thanks for the suggestion. It worked for me. Actually I had not saved the file in the WD accidentally and with the help of get files syntax I got to know what was the issue. Thanks a ton. Shivi -- View this message in context:

[R] Issues with loading csv file

2015-05-25 Thread Shivi82
HI All, I am trying to load an CSV file into the R project. the code for the same is: mydata- read.csv(Jan-May Data.csv, header=TRUE) however with this I am getting the below error message: /*Error in file(file, rt) : cannot open the connection In addition: Warning message: In file(file, rt) :

Re: [R] R programming

2015-05-22 Thread Shivi82
Hi Varun, Courses offered from Coursera EDX are very informative and carry details in depth. However I agree with your point that these courses are very fast paced sometimes very technical in nature. (I found the same when I went for Linear regression course) I have also recently started

[R] Dropping predictor variables based on adjusted R square

2015-05-14 Thread Shivi82
Hello experts, I have recently (1month) started using R. Earlier I was using SAS to work on analytic assignments. In SAS there is an option - forward selection, backward selection, step wise selection where in it removes the least impacting predictor variable from the set of variables based on

[R] Residual Plots

2015-05-13 Thread Shivi82
HI All, I Am creating a residual plot for my linear model. the code I created is : plot(eval$bty_avg,residuals,ylab=residuals, xlab=Score, main = Residual Analysis)Here data set is eval. eval$bty_avg is my response variable and residual is the var I have created using resid function to store the

Re: [R] MOnth over Month Variance in %

2015-05-07 Thread Shivi82
Thanks John for the tip. I will use it and see what is the output. Also I will share my analysis on R then you can advice accordingly. -- View this message in context: http://r.789695.n4.nabble.com/MOnth-over-Month-Variance-in-tp4706873p4706923.html Sent from the R help mailing list archive

[R] MOnth over Month Variance in %

2015-05-06 Thread Shivi82
Hi All, I have data based on truck load for various states. The data points range from Oct'14 To Mar'15. Now I need to know what was the difference in load in Nov as compared to Oct in both real numbers as well as in %. Similarly for all the month in comparison to the previous month. I am able to

Re: [R] Inference Syntax

2015-05-01 Thread Shivi82
Hi All, Thanks for extending help on this one. I am able to understand how what it refers to. I am using R studio as I think it comes as an inbuilt capability. -- View this message in context: http://r.789695.n4.nabble.com/Inference-Syntax-tp4706637p4706677.html Sent from the R help mailing

[R] Inference Syntax

2015-04-30 Thread Shivi82
Hi All, This is my first post in the community. I am currently working on finding some inferences from my sample data and the code I have used is: inference(y = nc$weight, x = nc$habit, est = mean, type = ht, null = 0, method = theoretical). While researching more on the code as I have just