Re: [R] data manipulation

2016-12-14 Thread John Kane via R-help
xx <- read.csv("http://massey.ac.nz/~pscoperwait/ts/cbe.dat;) gives me something. Since we have no idea of what you are doing I don't know if the data has downloaded correctly On Tuesday, December 13, 2016 1:38 PM, Farshad Fathian wrote: Hi, I couldn't

Re: [R] data manipulation

2016-12-15 Thread John Kane via R-help
It downloaded a file for me earlier but I am not getting the 404 error and I did not bother to save the download.  Shrug. On Wednesday, December 14, 2016 6:57 AM, John Kane via R-help <r-help@r-project.org> wrote: xx <- read.csv("http://massey.ac.nz/~pscoperwait/ts/cbe.

Re: [R] ggplot aestetics: beginner question - I am lost in endless possibilites

2016-12-15 Thread John Kane via R-help
I cannot see how you get that code to run. It certainly does not on my machine and some of the manipulations don't make any sense as far as I can see. I changed variable and data.frame names so I would not have to type so much and read in the data with the "stringsAsFactors = FALSE" option. I

Re: [R] data manipulation

2016-12-15 Thread John Kane via R-help
ay, December 14, 2016 6:57 AM, John Kane via R-help <r-help@r-project.org> wrote: xx <- read.csv("http://massey.ac.nz/~pscoperwait/ts/cbe.dat;) gives me something. Since we have no idea of what you are doing I don't know if the data has downloaded correctly     On Tuesday, De

Re: [R] How these Plots are called? Which package

2017-01-14 Thread John Kane via R-help
No sign of attachment. On Saturday, January 14, 2017 5:42 AM, Alaios via R-help wrote: Hello,how I can try something like that in R (in the attachment I am providing a sketch).Which packages would you try to use?I would like to thank you in advance for your

Re: [R] Using ggplot2 to plot percentages in bar chart.

2016-12-05 Thread John Kane via R-help
I've never seen   stat_bin used like that. What exactly is it supposed to do. It looks like you are trying to label the %ages in each piece of the bar. On Monday, December 5, 2016 2:17 PM, Shawn Way wrote: I have the following data in which I'm trying to summarize in a

Re: [R] (no subject)

2016-12-06 Thread John Kane via R-help
No attachment.  R-help; is very fussy about the type of file it will accept. Try a text document with .txt extention or just put the code and the sample data in the actual email. Use dput(), see ?dput for details, to provide the data. On Tuesday, December 6, 2016 6:51 AM, michael tsagris

Re: [R] Using ggplot2 to plot percentages in bar chart.

2016-12-06 Thread John Kane via R-help
Well personally I would not have a clue on how to approach the problem but have a look at http://stackoverflow.com/questions/6644997/showing-data-values-on-stacked-bar-chart-in-ggplot2. which seems to do what you want only using geom_text() Best of luck.   On Monday, December 5,

Re: [R] gridExtra-arrangeGrob

2017-01-09 Thread John Kane via R-help
I'm not sure what the problem is but, if nothing else, it looks like you need to do library(grid) It may be that an early version of ggplot2 or gridExtra was automatically loading grid and it no longer does.  On Monday, January 9, 2017 1:08 AM, Felipe Carrillo via R-help

Re: [R] Urgent Help

2016-12-26 Thread John Kane via R-help
No data or code.  Your attachments did not arrive.  See http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example for some suggestions on how to submit a question with data and sample code.   On Sunday, December 25, 2016 11:50 PM, Bert Gunter

Re: [R] Presentation Quality Tables, e.g., Ten rows, Five columns, with nice headers

2017-03-27 Thread John Kane via R-help
If you are working in LaTeX I'd suggest having a look at the R package  xtable with the  LaTeX package booktabs.  On Sunday, March 26, 2017 2:23 PM, MyCalendar wrote: Hi R'ers: After browsing for a good package for quality table construction, I found nothing.

Re: [R] Error in leaps.

2017-03-23 Thread John Kane via R-help
Hi Cindy,Welcome to R-help. Have  a look at the posting guidelines and their suggestion about a minimal example. What we  need to help you is some sample data and a "minimal" amount of code that illustrates your problem. Someone may be able to guess the problem from your errror message but I'd

Re: [R] weird ggplot geom_segment behaviour

2017-03-17 Thread John Kane via R-help
Hi Petr,It "seems" to be linked to the =/- 14 days that you are using for the limits. The code below should  restore one more bar. After that I don't know. p2 <- p+geom_segment(alpha=.4, size=3)+xlim(c(today()-21, today()+21))+   geom_vline(xintercept=as.numeric(today()), colour="pink", size=5)

Re: [R] How to convert .Rdata file into .csv or something else?

2017-08-17 Thread John Kane via R-help
Welcome to the forum .Rdata may contain many different objects. I would suggest doing a  "ls()" to see what objects you have. then have a look at ?write.table or ?write.csvThese commands will write many types of objects to a .csv file. For example if I have a data.frame called "dat1" I can write

Re: [R] Factor vs character in a data.frame vs vector

2017-07-07 Thread John Kane via R-help
17, 10:37:29 AM EDT, Marc Schwartz <marc_schwa...@me.com> wrote: > On Jul 7, 2017, at 6:03 AM, John Kane via R-help <r-help@r-project.org> wrote: > > This is not  serious problem but I just wonder if someone can explain what is > happening. > The same comman

Re: [R] Factor vs character in a data.frame vs vector

2017-07-08 Thread John Kane via R-help
ernatives would be to use the 'colClasses' argument to explicitly set such vectors to character, or to use I(...) to create AsIs class columns. Regards, Marc > > > > On Friday, July 7, 2017, 10:37:29 AM EDT, Marc Schwartz > <marc_schwa...@me.com> wrote: > >

[R] Factor vs character in a data.frame vs vector

2017-07-07 Thread John Kane via R-help
This is not  serious problem but I just wonder if someone can explain what is happening. The same command within a dataframe is giving me a factor and as a plain vector is giving me a character.  It's probably something simple that I have read and forgotten but I thought I'd ask. Thanks

Re: [R] Problem for installing cbPlatte on R Version 3.4.1

2017-07-12 Thread John Kane via R-help
What is cbplatte? Where do we find it? On Wednesday, July 12, 2017, 6:20:38 AM EDT, Shanu Singh wrote: Please solve the problem. on which R Version works cbplatte? Regards Shanu     [[alternative HTML version deleted]]

Re: [R] Update data in text file with data in dataframe

2017-08-19 Thread John Kane via R-help
I think we need a bit more info on the data layout and what decision rule you are using to update the Date of Service. Are you just updating a record to provide the most recent DoS or are you correcting errors? Have a look at

Re: [R] Rounding of problem with sum command in R

2017-08-22 Thread John Kane via R-help
Try options(digits=12) sum(v) BTW I don't get the same value as you did when you calculated manually. On Tuesday, August 22, 2017, 10:39:26 AM EDT, Bert Gunter wrote: ... and following up on Spencer's answer, see the "digits" argument of ?options and ?print.default.

Re: [R] How to install Tidyverse on Ubuntu 17.04? Getting gcc errors for -fstack-protector-strong and -Wdate-time

2017-08-17 Thread John Kane via R-help
No idea what the problem is but I am running Ubuntu 17.04 with R 3.4.1 and tidyverse seems to be working well. On Thursday, August 17, 2017, 7:10:42 AM EDT, Jocelyn Ireson-Paine via R-help wrote: I'm running Ubuntu 17.04 and R 3.4.1. I installed the latter yesterday,

Re: [R] Plotting bar charts by Month

2017-05-13 Thread John Kane via R-help
Could we see some sample data? On Tuesday, May 9, 2017 9:55 PM, Jeff Reichman wrote: r-help Trying to figure out how to plot by month bar charts. The follow code plots the monthly portion on a yearly x-scale.  So I either I create 12 individual month

Re: [R] Xtable with long column headings/names

2017-05-15 Thread John Kane via R-help
Can you give us an example. I am having a problem visualizing this.  It seems obvious just to put in a line break normally but in xtabs who knows? On Monday, May 15, 2017 1:15 PM, Bruce Ratner PhD wrote: R-help: I'm using xtable that produces a table in html with

Re: [R] Help on reducing multiple loops

2017-05-18 Thread John Kane via R-help
Data? It's difficult to do anything without some test data.See How to make a great R reproducible example? or http://adv-r.had.co.nz/Reproducibility.html  with particular reference to the use of dput() as the best way to provide sample data. | | | | || | | | | |

Re: [R] help regarding r-project

2017-06-08 Thread John Kane via R-help
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example On Thursday, June 8, 2017 6:57 AM, Michael Dewey wrote: I do not think anyone is going to be able to help you unless you can provide a reproducible example with a clear

Re: [R] Warning from reshape2 when melting a data frame with uneven number of columns.

2017-06-04 Thread John Kane via R-help
I am not really sure what the warning means but I think your underlying problem is that all your variables are factors. Did you intend the values in each variable to be character? data.frame':    3 obs. of  5 variables:  $ V1: Factor w/ 3 levels "Name1","Name2",..: 1 2 3  $ V2: Factor w/ 3

Re: [R] Adding non-data line to legend ggplot2 Maximum Contaminant Level

2017-10-05 Thread John Kane via R-help
Well, here is one way but it seems a bit clumsy. In words, I created a new data.frame with "250" in the Chloride vector and "SMCL" in the Detections vector and supplessed one legend. Warning: For my convenience I am using different data.frame names . library(ggplot2) MyData

Re: [R] Converting SAS Code

2017-10-01 Thread John Kane via R-help
And appropriatesly > library(fortunes) > fortune() SAS seems to be to statistical computing what Microsoft is to personal computing.    -- Bill Venables   'Exegeses on Linear Models' paper (May 2000) On Saturday, September 30, 2017, 4:57:23 PM EDT, Rolf Turner

Re: [R] Adding non-data line to legend ggplot2 Maximum Contaminant Level

2017-10-01 Thread John Kane via R-help
I just glanced at the problem but I think you would have to create a new variable to replace the hline. What about adding some text annotation in the graph instead? On Tuesday, September 26, 2017, 3:51:46 PM EDT, David Doyle wrote: Hello everyone, I have a

Re: [R] Pull data from Tally 9.1 to R studio

2017-08-24 Thread John Kane via R-help
IIt might help to read the material at one or both of these links http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example Reproducibility · Advanced R. | | | | Reproducibility · Advanced R. | | | On Thursday, August 24, 2017, 6:19:25 AM EDT, John

Re: [R] Pull data from Tally 9.1 to R studio

2017-08-24 Thread John Kane via R-help
On Thursday, August 24, 2017, 1:50:13 AM EDT, David Winsemius wrote: > On Aug 22, 2017, at 11:31 PM, jagan krishnan via R-help > wrote: > > Hi all, > This is Jagan.i have been provided a task of analyzing sales data of a > company in R

Re: [R] Help Required in looping visuals

2017-08-21 Thread John Kane via R-help
I think we need a lot more information on the problem.  read  the posting guidelines at the bottom of the email & have a look at these links. http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example Reproducibility · Advanced R. | | | | Reproducibility · Advanced

Re: [R] adding percentage secondary y-axis

2017-11-23 Thread John Kane via R-help
Actually Petr, I don't see that a secondary y-axis a problem here. If I understand it correctly Eliza is simply presenting the same data against two different scales. We in North America sometimes need to do the same thing when graphing, say  temperature data. We might want degrees Celsius on

Re: [R] Fw: modified mankendal

2017-11-23 Thread John Kane via R-help
Would you resubmit your question in plain text mode?  This is a plain text list and the HTML gets stripped away. What is left is this Hello DearI used modifiedmk package for trend analyses.this is my script  require(modifiedmk)X1<-read.table("c:/elham/first

Re: [R] Question - TukeyHSD

2017-11-05 Thread John Kane via R-help
I may be missing the point, but if you can do the calculations by hand could you not write a function in R to do the same and apply it to a data.frame of the values? On Saturday, November 4, 2017, 11:01:59 AM EDT, Paul Kent wrote: Hi, I've been

Re: [R] Ggplot error

2017-11-08 Thread John Kane via R-help
I get the same result as Eric  withR version 3.4.2 (2017-09-28) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 17.04 It looks like you have "tidyverse" loaded so I tried it with just ggplot2 loaded and with tidyverse loaded.  On Wednesday, November 8, 2017, 4:16:14 AM EST,

Re: [R] error to run this package

2017-10-31 Thread John Kane via R-help
Since we don't know what you were doing when this happened it is a bit difficult to guess. Please supply a minimal set of code that demonstrates what you were doing that gives this error. The output of sessionInfo() would also be useful. Have a look at

Re: [R] (no subject)

2018-05-10 Thread John Kane via R-help
We need some idea of the problem. http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example http://adv-r.had.co.nz/Reproducibility.html On Thursday, May 10, 2018, 11:07:30 a.m. EDT, malika yassa via R-help wrote: Hello Do You

Re: [R] using for loop with data frames.

2018-05-10 Thread John Kane via R-help
Why not just use an rbind() and create one data.frame? On Thursday, May 10, 2018, 10:34:19 a.m. EDT, Marcelo Mariano Silva wrote: Hi, Is it possible use a loop to process many data frames in the same way? For example, if I have three data frames, all

Re: [R] (no subject)

2018-05-12 Thread John Kane via R-help
Thanks I think that may help but it is outside my small area of knowledge. With any luck, someone will be along soon to give some help. Why are using attach(res)? I don't see the need. Good luck. On Saturday, May 12, 2018, 12:50:24 p.m. EDT, malika yassa wrote:

Re: [R] Convert a list of $NULL into multiple dataframes

2018-05-18 Thread John Kane via R-help
There must be a simpler and easier way but it's early here and I am only on my first cup of tea. Just but each element into a data frame. Quick and dirty example: dat1  <- list(aa = 1:20, bb  <- data.frame(xx = 1:5, yy = LETTERS[1:5])) dat2 = data.frame(dat1[[1]])

Re: [R] Plot qualitative y axis

2018-05-21 Thread John Kane via R-help
What I think is the ggplot2 version of what you want. Note that I am using the reshape2 package which is a bit old fashioned.  =library(reshape2) library(ggplot2) dat1  <- structure(list(N = c("I", "II", "III", "IV", "V", "VI",

Re: [R] Loop Function to Create Multiple Scatterplots

2018-05-21 Thread John Kane via R-help
As Jim says, "No data". R-help is very fussy about what files it will accept.  You might try changing the extention to txt.  However the preferred way here is to use the dput() command and paste the results into the post.  See ?dput for details. On Monday, May 21, 2018, 1:40:59 a.m.

Re: [R] Plot qualitative y axis

2018-05-23 Thread John Kane via R-help
Hi Pedro, melt() is probably working. The problem is I did not finish the copy and paste.  It would have been better if I had included the ggplot() command. Try == library(reshape2) library(ggplot2) dat1  <- structure(list(N =

Re: [R] How to threshold point in time series

2018-06-08 Thread John Kane via R-help
Homework? On Friday, June 8, 2018, 4:20:40 p.m. EDT, Rama shankar wrote: Hi All, I am having very high-frequency data, captured  between 3 to 7 seconds by sensor for liquid tank and capacity of tank is 50k dm3. When tank capacity reduce to 1k dm3, than tank refilling need to call. How

Re: [R] Draw Overlapping Circles with shaded tracks

2017-12-31 Thread John Kane via R-help
That code nees the plotrix package: library(plotrix) pdf("circles.pdf") plot(0:10,type="n",axes=FALSE,xlab="",ylab="") draw.circle(4,5,radius=3,border="#ffaa",lwd=10) draw.circle(6,5,radius=3,border="#ffaa",lwd=10) dev.off() On Friday, December 29, 2017, 6:06:32 PM EST, Jim Lemon

Re: [R] R-hts

2018-01-10 Thread John Kane via R-help
Have a look at http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example and http://adv-r.had.co.nz/Reproducibility.html On Wednesday, January 10, 2018, 11:51:22 AM EST, deva d wrote: dear all, i need some help in structuring

Re: [R] Portable R in zip file for Windows

2018-01-25 Thread John Kane via R-help
I have not done this is years, but I think that I just installed R on a USB stick and it was fine. But that was probably 10 years ago so things may have changed completely since then. On Wednesday, January 24, 2018, 10:12:09 PM EST, Juan Manuel Truppia wrote: I

Re: [R] as.Date() function

2018-08-21 Thread John Kane via R-help
You loaded "lubridate" so using Erin's approach library(lubridate) st <- c("1961-01","1961-04","1983-02") dat1 <- ymd(paste( st, "01",  sep ="-")) On Monday, August 20, 2018, 1:15:56 a.m. EDT, wrote: Thanks Erin and Jim. You have indeed solved my problem. Philip Quoting Erin

Re: [R] Cant schedule R job using taskscheduleR

2018-08-27 Thread John Kane via R-help
A quick guess it that your version of R is outdated.sessionInfo() R version 3.5.0 package ‘taskscheduleR’ was built under R version 3.5.1 I don't know if that is the source of the error but I'd suggest updating to 3.5.1 as a first step. On Friday, August 24, 2018, 9:12:36 a.m. EDT,

Re: [R] importing .v8x file in R

2018-08-27 Thread John Kane via R-help
A simple google would have let you here SAS Enterprise Guide Implemented at MDACC.It looks like you have a SAS transport file . Check out the SASxport package. It may do what you want. | | | | SAS Enterprise Guide Implemented at MDACC | | | On Thursday, August 23, 2018,

[R] Problem with mean()

2018-07-21 Thread John Kane via R-help
Either I am doing something very stupid or my R installation has a glitch. What am I missing? dd1  <- 50 dd2  <- 54 mean(dd1, dd2) [1] 50  # wrong (dd1 + dd2)/2 [1] 52 # correct aa  <- c(48, 52, 56, 54, 52) mean(aa) [1] 52.4 # correct [[alternative HTML version deleted]]

Re: [R] xtable does not print out units of a variable

2018-07-19 Thread John Kane via R-help
 I wonder if the problem may be that xtable is not designed to deal with an object of class "object" > dat1 <- data.frame(  x=c(as_units(12,"ft"))) > str(dat1) 'data.frame':    1 obs. of  1 variable:  $ x:Object of class units:  atomic  12   ..- attr(*, "units")=List of 2   .. ..$ numerator  :

Re: [R] Syntax roccomp-using R

2018-04-15 Thread John Kane via R-help
You really should  read the posting guide (link at the bottom of the e-mail) and also read one or both of http://stackoverflow.com/questions/5963269 /how-to-make-a-great-r-reproducible-example and http://adv-r.had.co.nz/Reproducibility.html As it stands your posts are very close to unreadable.

Re: [R] Specifying forbidden configurations in Morris One at a Time (OAT) sensitivity analysis

2018-04-15 Thread John Kane via R-help
If nothing else, I think you need to supply some sample data that includes examples of the "forbidden configurations" See http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example and/or http://adv-r.had.co.nz/Reproducibility.html On Monday, April 9, 2018,

Re: [R] detecting measurement of specific id in column in R

2018-11-28 Thread John Kane via R-help
No attached file. R-help is very fussy about what kind of file it will accept, A txt or pdf is the best bet. On the other hand it usually is best to include any code and sample data in the actual e-mail.  Use the function dput() as the best way to supply data. On Thursday, November 22,

[R] R installation Ubuntu 18.04 missing dependency libreadline6

2019-03-03 Thread John Kane via R-help
NOTE. This is a re-post of a message of Saturday 2018-03-03 sent with an incorrect header. To upgrade to R.3.5.2 from 3.4.4 I have been following the instructions at https://www.r-bloggers.com/installation-of-r-3-5-on-ubuntu-18-04-lts-and-tips-for-spatial-packages/ . I seem to have the

Re: [R] R installation Ubuntu 18.04 missing dependency libreadline6

2019-03-03 Thread John Kane via R-help
R or ubuntu. My guess is that you've been reading too many > blog posts and adding too many ppa's to your system, which can lead to > package conflicts. Unfortunately in that case it's hard for people to > help you remotely, since we don't know what you've done to your > system. >

Re: [R] R installation Ubuntu 18.04 missing dependency libreadline6

2019-03-03 Thread John Kane via R-help
, 2019 at 6:20 AM John Kane via R-help wrote: > > >  NOTE. This is a re-post of a message of Saturday 2018-03-03 sent with an >incorrect header. > > To upgrade to R.3.5.2 from 3.4.4 I have been following the instructions at > https://www.r-bloggers.com/installation-of-r-3-

Re: [R] R installation Ubuntu 18.04 missing dependency libreadline6

2019-03-03 Thread John Kane via R-help
ppa's to your system, which can lead to package conflicts. Unfortunately in that case it's hard for people to help you remotely, since we don't know what you've done to your system. Best, Ista On Sun, Mar 3, 2019 at 6:20 AM John Kane via R-help wrote: > > >  NOTE. This is a re-post of