Re: [R] 2D and 3D graphing

2020-03-26 Thread EK Esawi via R-help
gt;> is not very interactive by does create a useful 3D plot. The data that I >> used was >> generally not very large. >> >> In the sample commands "R_terminal_input.txt", the working directory is >> given as >> "C:/rgl_test". Line 14 in t

Re: [R] 2D and 3D graphing

2020-03-24 Thread EK Esawi via R-help
way to do that with arbitrary scattered points. That is why the surface3d function interface is separate from the points3d function interface ... it uses a matrix to communicate adjacency for four points at a time. On March 23, 2020 7:54:04 PM PDT, EK Esawi via R-help wrote: > >Thank

Re: [R] 2D and 3D graphing

2020-03-23 Thread EK Esawi via R-help
ooked at was in principle components so x, y, and z were in the same units. I can post a sample of the terminal input that I used if that would help. LMH Ek Esawi wrote: > Hi All-- > > I have been looking into 2D and 3D graphing packages. Based on what i > read, it seems that ggplot2 is

[R] 2D and 3D graphing

2020-03-23 Thread Ek Esawi
Hi All-- I have been looking into 2D and 3D graphing packages. Based on what i read, it seems that ggplot2 is the best and I like it too, but ggplot2 doesn't have 3D plotting capabilities. I read that other packages (plot_ly, rgl, rayshader) can be used with ggplot2 to create 3D charts, but not su

Re: [R] Sequential Filtering of a Data Set

2019-04-27 Thread Ek Esawi
Hi If i understand your question correctly, it seems split or split date will do what you want. BOL--EK On Fri, Apr 26, 2019 at 10:51 AM Lorenzo Isella wrote: > > Dear All, > I must be drowning in a glass of water. > Consider the following data set > > tt2<-structure(list(year = c(2000, 2001, 2

Re: [R] Alternative to loops

2019-04-07 Thread Ek Esawi
choices<- sapply(MyDF$B, strsplit, split = " +") > > nm <- names(MyList) > > MyDF$C <- nm[sapply(choices, function(x)match(TRUE, > > sapply(MyList,function(tbl)any(x %in% tbl] > > MyDF$C > [1] "Y" "z" "X" NA NA > &

[R] Alternative to loops

2019-04-06 Thread Ek Esawi
Thank you. Sorry i forgot to turn off the html Below is a sample of my data. My original data frame has over 10,000 rows. I want to check each element on my data frame column B (MyDF$B) to see if it contains any element(s) of MYList. if os, change the value of MyDF$C to the name of the vector of t

[R] Alternative to lops

2019-04-04 Thread Ek Esawi
Hi All-- Sorry i sent the one inadvertently Her is a sample of my data. A data frame (MyDF) and a list (MyList). My own data frame has over 10,000 rows. I want to find out which elements of MyDF$B contain any element(s) of MYList; then change MyDF$C to the name of the vector of the list that has

[R] Alternative to loops

2019-04-04 Thread Ek Esawi
Hi All Her is a sample of my data. A data frame (MyDF) and a list (MyList). My own data frame has over 10,000 rows. I want to find out which elements of MyDF$B contain any element(s) of MYList; then change MyDF$C to the name of the vector of the list that has match. I solved this via loops and i

Re: [R] Split a DF on Date column for each single year

2019-03-15 Thread Ek Esawi
f to > make the grouping column? > > On March 15, 2019 10:40:01 PM PDT, Ek Esawi wrote: > >Hi All— > > > >I have a data frame with over 13000 rows and 4 columns. A mini data > >frame is given at the bottom. I want to split the data frame into > >lists each co

[R] Split a DF on Date column for each single year

2019-03-15 Thread Ek Esawi
Hi All— I have a data frame with over 13000 rows and 4 columns. A mini data frame is given at the bottom. I want to split the data frame into lists each corresponds to single year which ranges from 1990 to 2018). I wanted to use the split function, but it requires a vector of the same length as My

Re: [R] Function doesn't work inside loop but works outside

2019-03-05 Thread Ek Esawi
Thank you Peter. That's a dumb question on my part! At least i should have known that i need an assignment statement. Thanks again--EK On Tue, Mar 5, 2019 at 11:36 AM peter dalgaard wrote: > > You need a print() around the gsub(...) when inside a loop. > > -pd > > > On

[R] Function doesn't work inside loop but works outside

2019-03-05 Thread Ek Esawi
Hi All, I am using xlsx package to extract and clean data from an Excel Workbook. I ran into a strange behavior that I don’t understand. The gsub doesn’t work inside the loop but does outside the loop as shown on my code.. Tried to Google for help but nothing came up. My code loads and reads data

Re: [R] Remove cases with -Inf from a data frame

2019-02-17 Thread Ek Esawi
This is a similar versions of other answers. df[apply(apply(df,2,is.finite),1,sum)==4,] BOL---EK On Sat, Feb 16, 2019 at 10:07 AM AbouEl-Makarim Aboueissa wrote: > > Dear All: good morning > > > I have a log-transformed data frame with some *-Inf* data values. > > *my question: *how to remove a

[R] Create a new list from selected items in another list

2019-01-26 Thread Ek Esawi
Hi All-- I have a list which contain variables 0s at the end of each vector on the isit. I want to create a new list with only numbers > 0. It seems simple, but i tried several option, none of which worked. CCC <- list(A=c(1,2,3,0,0,0,0), B=c(2,3,4,5,0,0,0,0,0,0)) for (i in 1:length(CCC)) { f

Re: [R] Combine recursive lists in a single list or data frame and write it to file

2018-12-20 Thread Ek Esawi
FillList and then converting to a data frame. If > you can send some data (if it's not too big) I can test it and make > sure that it works, as it did every time for me. > > Jim > > On Thu, Dec 20, 2018 at 2:22 PM Ek Esawi wrote: > > > > Thank you Jim. I did use u

Re: [R] Combine recursive lists in a single list or data frame and write it to file

2018-12-19 Thread Ek Esawi
the levels or a nested list to convert it to a single level list. > > Jim > > On Thu, Dec 20, 2018 at 1:33 PM Ek Esawi wrote: > > > > Thank you Bert. I don't see how unlist will help. I want to combine > > them but keep the "rectangular structure",e.g

Re: [R] Combine recursive lists in a single list or data frame and write it to file

2018-12-19 Thread Ek Esawi
On Wed, Dec 19, 2018 at 9:10 PM Bert Gunter wrote: > > Does ?unlist not help? Why not? > > Bert > > > On Wed, Dec 19, 2018, 5:13 PM Ek Esawi > >> Hi All— >> >> I am using the R tabulizer package to extract tables from pdf files. >> The output is a

[R] Combine recursive lists in a single list or data frame and write it to file

2018-12-19 Thread Ek Esawi
Hi All— I am using the R tabulizer package to extract tables from pdf files. The output is a set of lists of matrices. The package extracts tables and a lot of extra stuff which is nearly impossible to clean with RegEx. So, I want to clean it manually. To do so I need to (1) combine all lists in

Re: [R] Combine lists into a data frame or append them to a text file

2018-12-16 Thread Ek Esawi
;,"b","c")) > BB <- list(c=c(1,2,3,4,5),d=c("a","b","c","d","e")) > mylist <- c(AA,BB) > mydf > Jim > > On Mon, Dec 17, 2018 at 12:45 AM Ek Esawi wrote: > > > > Thank you Jim and Bert, > >

Re: [R] Combine lists into a data frame or append them to a text file

2018-12-16 Thread Ek Esawi
lapply(mylist,function(x) write.table(x,file = test.txt)) Show Traceback Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, : arguments imply differing number of rows: 4, 3 On Sun, Dec 16, 2018 at 8:45 AM Ek Esawi wrote: > > Thank you Jim and Bert, > > I

[R] Combine lists into a data frame or append them to a text file

2018-12-15 Thread Ek Esawi
Hi All, I have an R object that is made up of N number of lists which are all of different number of columns and rows. I want to combine the N lists into a single data frame or write (append) them into text file. I hope the question is clear and doesn’t require an example. I am hoping to accompli

Re: [R] Remove specific rows from nested list of matrices

2018-11-08 Thread Ek Esawi
*\\s|^[0-9]x.*|.*[P-p]oints.*|.*\\sto\\s.*" To remove some unwanted entries, I used this formula. F <- lapply(G, function(x) lapply(x, function (y) lapply(y, function(z) gsub(S1,"",z Thanks again--EK On Fri, Nov 2, 2018 at 11:00 AM Ek Esawi wrote: > > Hi All, > >

Re: [R] Remove specific rows from nested list of matrices

2018-11-02 Thread Ek Esawi
01/02", "01/02 01/02", Thanks again--EK On Fri, Nov 2, 2018 at 11:21 AM Jeff Newmiller wrote: > > Can you supply the output of > > dput(FF) > > ? > > On November 2, 2018 8:00:08 AM PDT, Ek Esawi wrote: > >Hi All, > > > >I have a list that

[R] Remove specific rows from nested list of matrices

2018-11-02 Thread Ek Esawi
Hi All, I have a list that is made up of nested lists, as shown below. I want to remove all rows in each sub-list that start with an empty space, that’s the first entry of a row is blank; for example, on [[1]][[1]][[1]] Remove row 4,on [[1]][[1]][[3]] remove row 5, on [[1]][[2]][[1]] remove row 6,

Re: [R] remove text from nested list

2018-10-25 Thread Ek Esawi
, something seems screwy in the example you showed: For example, the > [[1]][[2]][[1]] component indicates a 2 x 5 matrix, but I see only 3 columns > of text. Am I missing something? > > Cheers, > Bert > > > > On Thu, Oct 25, 2018 at 6:04 PM Ek Esawi wrote: >> >&g

[R] remove text from nested list

2018-10-25 Thread Ek Esawi
Hi All— I have a list that contains multiple sub-lists and each sub-list contains multiple sub(sub-lists), each of the sub(sub-lists) is made up of matrices of text. I want to replace some of the text in some parts in the matrices on the list. I tried gsub and stringr, str_remove, but nothing see

Re: [R] Reorder file names read by list.files function

2018-10-11 Thread Ek Esawi
work and i will try it and see. Thank you all. EK On Tue, Oct 9, 2018 at 9:44 AM Ek Esawi wrote: > > Hi All-- > > I used base R list.file function to read files from a directory. The > file names are months (April, August, etc). That's the system reads > them in alphabetica

Re: [R] Reorder file names read by list.files function

2018-10-10 Thread Ek Esawi
(the untested) > FNs <- sort(match(sub("\\.PDF", "", basename(file.names)), month.name)) > > Bill Dunlap > TIBCO Software > wdunlap tibco.com > > On Tue, Oct 9, 2018 at 1:38 PM, Ek Esawi wrote: >> >> Hi again, >> >> I worked

Re: [R] Reorder file names read by list.files function

2018-10-09 Thread Ek Esawi
lt;- fnames[ match( sub("\\.PDF", "", fnames ), month.name ) ] > > > On October 9, 2018 6:44:21 AM PDT, Ek Esawi wrote: > >Hi All-- > > > >I used base R list.file function to read files from a directory. The > >file names are months (April, Augus

Re: [R] Reorder file names read by list.files function

2018-10-09 Thread Ek Esawi
, pattern =".PDF",full.names = TRUE) > file.names <- str_remove(file.names,"\\s[0-9][0-9]") > FNs <- sort(match(sub("\\.PDF", "", file.names), month.name)) > FNs1 <- paste0(month.name[FNs],".","PDF") > A <- lapply(F

[R] Reorder file names read by list.files function

2018-10-09 Thread Ek Esawi
Hi All-- I used base R list.file function to read files from a directory. The file names are months (April, August, etc). That's the system reads them in alphabetical order., but i want to reordered them in calendar order (January, February, ...December).. I thought i might be able to do it via Re

Re: [R] From for loop to lappy?

2018-10-01 Thread Ek Esawi
t; 925-423-1062 > Lab cell 925-724-7509 > > > > On 10/1/18, 3:32 PM, "R-help on behalf of Ek Esawi" > wrote: > > Hi All— > > I am using Tabulizer to extract tables from PDF files. Tabulizer > creates a list of matrices for each set of tab

[R] From for loop to lappy?

2018-10-01 Thread Ek Esawi
Hi All— I am using Tabulizer to extract tables from PDF files. Tabulizer creates a list of matrices for each set of tables in each document. My code, below, works well. Then i thought i would use lapply instead of for loop since it is a little faster and more compact, but i kept getting an error m

Re: [R] error "The system cannot find the file specified..."

2018-09-23 Thread Ek Esawi
Thank you Bert and Rui. Everything mentioned on your posts was OK with the exception of a typo in my original post where [a] was instead [[a]]. I stumbled one something that stated if i delete the sub-directory and create it it again might work. In my case once that was done, it worked. Thanks aga

[R] error "The system cannot find the file specified..."

2018-09-22 Thread Ek Esawi
Hi All, I am using the R Tabulizer package to extract tables from a set of pdf files. Tabulizer creates a list of data frames; each corresponds to a table in a file. My aim is to create a list of lists, one for each file.i have 8 files The code below kept giving me the error "Error in normalizePat

Re: [R] Aggregate over multiple and unequal column length data frames

2018-02-28 Thread Ek Esawi
Thank you again Pikal and Bert. Using lapply, as Bert suggested, was the first thing that i thought of dealing with this question and was mentioned in my original posting. I just did not know how to implement it to get the results/form i want. Below is what i did but could not get it to give me th

Re: [R] Aggregate over multiple and unequal column length data frames

2018-02-27 Thread Ek Esawi
bably they would be > different from yours and also the result would not be necessary the same as > you expect. > > You should post those data frames as output from dput(data) and show us real > desired result from those example data frames. > > Cheers > Petr > &g

[R] Aggregate over multiple and unequal column length data frames

2018-02-20 Thread Ek Esawi
Hi All-- I have generated several 2 column data frames with variable length. The data frames have the same column names and variable types. I was trying to aggregate over the 2nd column for all the date frames, but could not figure out how. I thought i could make them all of equal length then co

Re: [R] substr gives empty output

2018-01-21 Thread Ek Esawi
The reason you get "" is, as stated on the previous response and on the documentation of substr function, the function "When extracting, if start is larger than the string length then "" is returned.". This is what happens on your function. HTH EK On Sun, Jan 21, 2018 at 3:59 AM, Luigi Marongiu

Re: [R] Replace NAs in split lists

2018-01-08 Thread Ek Esawi
Thank you all. Now everything works. Happy 2018 and beyond EK On Sun, Jan 7, 2018 at 10:13 PM, Ek Esawi wrote: > Hi all-- > > I stumbled on this problem online. I did not like the solution given > there which was a long UDF. I thought why cannot split and l/s apply > work her

Re: [R] Replace NAs in split lists

2018-01-08 Thread Ek Esawi
code is mangled. Can you > post plain text and use the reprex package to make sure it produces the > errorin a clean R session? > -- > Sent from my phone. Please excuse my brevity. > > On January 8, 2018 8:03:45 AM PST, Ek Esawi wrote: >>Thank you Jeff. Your code works,

Re: [R] Replace NAs in split lists

2018-01-08 Thread Ek Esawi
gt; #> 1 a aaT 2 > #> 2 a abF 2 > #> 3 a acF 2 > #> 4 b aaT 5 > #> 5 b abF 5 > # > > > On Sun, 7 Jan 2018, Jeff Newmiller wrote: > >> Why do you want to modify df1?

Re: [R] Replace NAs in split lists

2018-01-07 Thread Ek Esawi
I just came up with a solution right after i posted the question, but i figured there must be a better and shorter one.than my solution sdf1[[1]][1,4]<-lapplyresults[[1]] sdf1[[2]][1,4]<-lapplyresults[[2]] EK On Sun, Jan 7, 2018 at 10:13 PM, Ek Esawi wrote: > Hi all-- > > I s

[R] Replace NAs in split lists

2018-01-07 Thread Ek Esawi
Hi all-- I stumbled on this problem online. I did not like the solution given there which was a long UDF. I thought why cannot split and l/s apply work here. My aim is to split the data frame, use l/sapply, make changes on the split lists and combine the split lists to new data frame with the desi

Re: [R] Help with script

2017-12-29 Thread Ek Esawi
Hi Pablo, Rui's suggestion is probably the best and easiest. In addition to Eric's, i think the apply functions will work well here too. Best of luck, EK On Thu, Dec 28, 2017 at 7:03 PM, PABLO ORTIZ PINEDA wrote: > Hello there. Happy new year for everyone! > > I need help with a table. This ta

Re: [R] match and new columns

2017-12-15 Thread Ek Esawi
Hi Val— Here is something similar to what Bill suggested. wainb <- which(tdat$A %in% tdat$B) tdat[c(length(tdat$D)-1,length(tdat$D)),c("D","E")] <- tdat[wainb,c("B","C")] HTH EK On Wed, Dec 13, 2017 at 4:36 PM, Val wrote: > Hi all, > > I have a data frame > tdat <- read.table(textConnection(

Re: [R] Remove

2017-12-09 Thread Ek Esawi
HI-- How about this one. It produces the desired result. If you have more conditions, you can put them in a matrix/DF form and subset as suggested by one of the previous suggestion. DM[(DM$GR=="A"&DM$x>=15&DM$x<=30)|(DM$GR=="B"&DM$x>=40&DM$x<=50)|(DM $GR=="C"&DM$x>=60&DM$x<=70),] EK On Sat, De

Re: [R] trying to find the multiple combinations...

2017-12-08 Thread Ek Esawi
As Burt and Jeff stated that there is an infinite set of solutions. If you are interested in a particular solution, such as getting 15.0078, you can easily achieve that by trial and error; that is fix 1 or 2 variables and change the the rest till you get the desired solution. I tried that and came

Re: [R] Dynamic reference, right-hand side of function

2017-12-04 Thread Ek Esawi
Hi Love, I am not sure if I understand your question and it will help if you provided a sample data frame, sample of your code and sample of your output and the output you desire. Having said that, I think you could use cbind to join all datasets into a matrix and use the apply family of functions

Re: [R] assign NA to rows by test on multiple columns of a data frame

2017-11-22 Thread Ek Esawi
luck EK a <- grep("_flag",colnames(mydf)) b <- mydf[,a]==0 c <- mydf[,a-1] c[b] <- NA mydf[,a-1] <- c mydf A A_flag B B_flag 1 8 10 5 12 2 NA 0 6 9 3 10 1 NA 0 4 NA 0 1 5 5 5 2 NA 0 On Wed, Nov 22, 2017 at 8:44 AM

Re: [R] assign NA to rows by test on multiple columns of a data frame

2017-11-22 Thread Ek Esawi
OPS, Sorry i did not read the post carfully. Mine will not work if you have zeros on columns A and B.. But you could modify it to work for specific columns i believe. EK On Wed, Nov 22, 2017 at 8:37 AM, Ek Esawi wrote: > Hi *Massimo,* > > *Try this.* > > *a <- mydf==0

Re: [R] assign NA to rows by test on multiple columns of a data frame

2017-11-22 Thread Ek Esawi
Hi *Massimo,* *Try this.* *a <- mydf==0mydf[a] <- NAHTHEK* On Wed, Nov 22, 2017 at 5:34 AM, Massimo Bressan < massimo.bres...@arpa.veneto.it> wrote: > > > Given this data frame (a simplified, essential reproducible example) > > > > > A<-c(8,7,10,1,5) > > A_flag<-c(10,0,1,0,2) > > B<-c(5,6,2,1,0

Re: [R] Count non-zero values in excluding NA Values

2017-10-29 Thread Ek Esawi
What was suggested by Eric and Rui works well, but here is a short and may be simpler answer provided your data is similar what Eric posted. It should work for your l data too. aa <- is.na(data)|data==0 nrow(data)-colSums(aa) EK On Sun, Oct 29, 2017 at 6:25 AM, Engin YILMAZ wrote: > Dear R Sta

Re: [R] Count non-zero values in excluding NA Values

2017-10-29 Thread Ek Esawi
Since i could not see your data, the easiest thing comes to mind is court values excluding NAs, is something like this sum(!is.na(x)) Best of luck--EK On Sun, Oct 29, 2017 at 6:25 AM, Engin YILMAZ wrote: > Dear R Staff > > You can see my data.csv file in the annex. > > I try to count non-zero v

Re: [R] Problem Subsetting Rows that Have NA's

2017-10-24 Thread Ek Esawi
z <- x[x[,2]==0&!is.na(x[,2]),] seems to work and get you what you want, but doesn't answer your question, z <- x[x[,2]==0&!is.na(x[,2]),] Best of luck, EK On Tue, Oct 24, 2017 at 3:05 PM, BooBoo wrote: > This has every appearance of being a bug. If it is not a bug, can someone > tell me what

Re: [R] nested loop

2017-09-09 Thread Ek Esawi
I would try fininterval as well. It should do what you have asked provided that you take care of the issue Ulrik pointed out. Best of luck--EK On Fri, Sep 8, 2017 at 6:15 AM, Hemant Sain wrote: > i have a vector containing values ranging from 0 to 24 > i want to create another variable which can

[R] Identyfing rows with specific conditions revisited

2017-08-14 Thread Ek Esawi
Allaisone 1 allaisone1 at hotmail.com Mon May 22 02:10:10 CEST 2017 Hi All— I am curious as to whether there is a vectorized solution using base R functions, instead of looping and if statements, to the problem below. I have seen several posts that address a similar question which generally ask to

[R] Fill in empty spaces modified

2017-08-09 Thread Ek Esawi
Thank you so much Jim. I forgot to state that i was hoping to get it without loops if possible. Thanks again, EK [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mai

[R] Fill in empty spaces modified

2017-08-09 Thread Ek Esawi
Hi All— I was looking at a posting from June-17. I managed to solve it. However, when I changed the example in the posting, my solution will work only once at a time which was mentioned by Jim Lemon on his response to the original posting. This means that my solution will have to be repeated as m

[R] How to replace match words whith colum name of data frame?Hi--

2017-08-01 Thread Ek Esawi
Hi-- concept_df$NewCol <- ""; kw <- "acid|ph"; bb <- grepl(kw,concept_df$concept) concept_df[dd,2] <- "chemical" The is a bit late but it accomplish the same with base R. Good luck--EK PS.. my email doesn't accept reply [[alternative HTML version deleted]]

[R] Counting with multiple criteria using data table

2017-06-21 Thread Ek Esawi
I have a data.table which is shown below. I want to count combinations of columns on i and count on j with by. A few examples are given below the table. I want to: all months to show on the output including those that they have zero value I want the three statements combined in on if possible

Re: [R] nested for loop with data table

2017-05-06 Thread Ek Esawi
; Perhaps look closely at [1], or Google for data table aggregation yourself? > > [1] https://www.r-bloggers.com/efficient-aggregation-and- > more-using-data-table/amp/ > -- > Sent from my phone. Please excuse my brevity. > > On May 3, 2017 8:17:21 AM PDT, Ek Esawi wrote: >

Re: [R] nested for loop with data table

2017-05-03 Thread Ek Esawi
11 17: 17 black E 101 February 17 18: 18red F90 July 21 19: 19red F 112 February 13 20: 20red F 101 July 20 On Tue, May 2, 2017 at 12:35 PM, Ek Esawi wrote: > I have a huge data file; a sample is listed below. I am using the package

[R] nested for loop with data table

2017-05-02 Thread Ek Esawi
I have a huge data file; a sample is listed below. I am using the package data table to process the file and I am stuck on one issue and need some feedback. I used fread to create a data table. Then I divided the data table (named File1) into 10 general subsets using common table commands such as:

[R] Data.table vs dplr handling multiple variables

2017-04-28 Thread Ek Esawi
Hi All— I am often working with large datasets with multiple variables (integer, decimal, string, complex, date, and time) that require processing, cleaning, etc. I am relatively new to R and I would like to get some input on the following issue: I am trying to figure out which R-package(s) is mos

Re: [R] Reading and converting time data via read.table

2016-06-09 Thread Ek Esawi
Thank you Jeff and Don. As I stated on my original posting that I am relatively new to R. After a few weeks of searching and reading I have come to the same point that Don made which is base R doesn’t have a class for time only. I explored the chron and lubridate packages and even looked at Ecfun p

Re: [R] Reading and converting time data via read.table

2016-06-07 Thread Ek Esawi
Thanks for the responses i received from David and Spencer. As for the package Ecfun, i looked at it briefly, but it's long and i am new to R; so this just adds to my confusion. David suggested the sub function which i will try and see what i get.i s As i said earlier i have no problems reading da

Re: [R] Reading and converting time data via read.table

2016-06-07 Thread Ek Esawi
Thanks Petr! I am still unable to come up with a conversion formula/trick to convert my time data to POSIXlt which then can be used in read.table. Below are again a few lines from my file. Since as you see there are several columns of time data ONLY (no date), I am hoping that there is a way to

Re: [R] Reading and converting time data via read.table

2016-06-05 Thread Ek Esawi
Thanks Jim! The problem is not date data. The problem is time. I figured out that I can use chron library and then use this expression times(paste0(t2, ":00")) because my time data are not h:m:s, only h;m. The problem I am trying to figure out is how to implement [times(paste0(t2, ":00"))] on c

[R] Reading and converting time data via read.table

2016-06-05 Thread Ek Esawi
Hi All-- I am relatively new to R. I am reading a csv file via read.table (MyFile). The data types in the file are date, string, integer, and time. I was able to read all the data and manipulated correctly except time, e.g., 12:30. I used as.Date to convert date and string and integer were easil