[R] seq argument along.with

2017-04-14 Thread Carl Sutton via R-help
Hi just messing around today and am now perplexed by the seq argument "along.with". Please, I am just just seeking some knowledge here. Obviously I missed a point and would like to know what it is. seq(1,10,length.out = 2) makes sense seq(1,10,by = 2) makes sense seq(1,10, along.wi

Re: [R] seq argument along.with

2017-04-14 Thread Carl Sutton via R-help
zero length, is to show that vector to the seq function as an example of how long to make the result. -- Sent from my phone. Please excuse my brevity. On April 14, 2017 2:55:48 PM PDT, Carl Sutton via R-help wrote: > > >Hi > > >just messing around today and am now perple

[R] the difference between "-" and "!" between base and data.table package

2017-04-15 Thread Carl Sutton via R-help
Hi I normally use package data.table but today was doing some base R coding. Had a problem for a bit which I finally resolved. I was attempting to separate a data frame between train and test sets, and in base R was using the "!" to exclude training set indices from the data frame. All I w

[R] seq argument alomg.with

2017-04-16 Thread Carl Sutton via R-help
Hi Thank you gentlemen for sharing your knowledge. It makes perfect sense and using seq_along prevents errors that could be perplexing and time consuming to discover. Thank you Carl Sutton __ R-help@r-project.org mailing list -- To UNSUBSCRIBE an

Re: [R] the difference between "-" and "!" between base and data.table package

2017-04-16 Thread Carl Sutton via R-help
7 1:00 AM, David Winsemius wrote: > On Apr 15, 2017, at 5:18 PM, Carl Sutton via R-help > wrote: > > Hi > > > I normally use package data.table but today was doing some base R coding. > Had a problem for a bit which I finally resolved. I was attempting to > separa

[R] matrix indexing/subset error

2016-05-30 Thread Carl Sutton via R-help
Hi Guru's In my quest to understand R I have what I thought was a simple exercise that now has me baffled.  Why the error message after running this code?  I am totally baffled by the error message.  I was expecting rows 1 and 3 of the x matrix to be returned, and have not a clue as to why this

[R] with and evaluation

2016-09-08 Thread Carl Sutton via R-help
Hi I have doing the R-exercises to improve my R programming capabilities.   Data.frame exercise 4 showed me that I have  a language problem.  Here's the problem and my "solution". #  Exercise 4#  Create a simple data frame from 3 vectors. Order the entire data frame by the#  first column.df2 <- d

[R] understanding with

2016-09-08 Thread Carl Sutton via R-help
 Hi I have been doing theR-exercises to improve my R programming capabilities.   Data.frame exercise4 showed me that I have a languageproblem.  Yes, I am frustrated, but please don’t take this as acriticism of the R language.  Theroutines I have managed to write do marvelous things in a short per

[R] problem with creating a file path using paste0

2015-12-01 Thread Carl Sutton via R-help
I am relatively new to programming in R.   I have attempted to create a function to replace brute force code, and in doing so need to create a data path and file name via paste0 (The years and quarter subfolders are different for different years and quarters).   It file path  created from paste0

[R] selecting columns from a data frame or data table by type, ie, numeric, integer

2016-04-29 Thread Carl Sutton via R-help
Good morning RGuru's I have a data frame of 575 columns.  I want to extract only those columns that are numeric(double) or integer to do some machine learning with.  I have searched the web for a couple of days (off and on) and have not found anything that shows how to do this.   Lots of ways to

Re: [R] selecting columns from a data frame or data table by type, ie, numeric, integer

2016-04-29 Thread Carl Sutton via R-help
Friday, April 29, 2016 10:50 AM, William Dunlap wrote: > dt1[ vapply(dt1, FUN=is.numeric, FUN.VALUE=NA) ]    a   c1   1 1.12   2 > 1.0...10 10 0.2 Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, Apr 29, 2016 at 9:19 AM, Carl Sutton via R-help wrote: Good morning RGuru's I

[R] selection columns by type, ie, numeric

2016-04-30 Thread Carl Sutton via R-help
My  thanks to Bill Dunlap and  Giorgio Garziano for  their help.   It is greatly appreciated.  I works so well, wow. Carl Sutton CPA [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https

Re: [R] Antwort: Re: selecting columns from a data frame or data table by type, ie, numeric, integer

2016-05-04 Thread Carl Sutton via R-help
ETH Zurich & R Core Team > > This way you can select variables of a certain class only and do > transformations. I found that this approach is not applicable if used with > statistical functions like head(). Transformations worked fine for me. > > I found reading the ab

[R] using conditionals to select rows in data.table

2016-11-21 Thread Carl Sutton via R-help
Hopefully the attached is text and not html.  I have not found a text option in firefox. I have also been informed that a windows cut and paste is not truly text, which is the reason for the attachment from notepad++ If there is any way I can improve the question, please inform of the problem

[R] dput and dget error

2016-12-23 Thread Carl Sutton via R-help
Merry Christmas and Happy Holidays I am attempting to use dput and or dget to send data along with a help request to another list (package specific). Read the help pages for both and they appeared to be fairly simple functions. Found an example on github and it appeared to be an easy task to

Re: [R] dput and dget error

2016-12-23 Thread Carl Sutton via R-help
PM, David Winsemius > wrote: > > >> On Dec 23, 2016, at 12:45 PM, Carl Sutton via R-help > wrote: >> >> Merry Christmas and Happy Holidays >> >> I am attempting to use dput and or dget to send data along with a help > request to another list (p

[R] Fw: Regex problem

2017-01-05 Thread Carl Sutton via R-help
Re-sending help request, went to wrong addy first time. r-help-requ...@r-project.org Belated Happy new year to the Guru's: I have a data frame with 570+ columns and in those column headers yours truly has a few blunders. Namely somehow I managed to end some of them with both an apostrophe '

Re: [R] Fw: Regex problem

2017-01-05 Thread Carl Sutton via R-help
017, at 10:09 AM, Carl Sutton via R-help > wrote: > > Re-sending help request, went to wrong addy first time.  > r-help-requ...@r-project.org > > Belated Happy new year to the Guru's: > > I have a data frame with 570+ columns and in those column headers yours trul

[R] Confused about using data.table package,

2017-02-21 Thread Carl Sutton via R-help
Hi I have found that:A)  Hadley's new book to be wonderful on how to use dplyr, ggplot2 and his other packages.  Read this and using as a reference saves major frustration. b)  Data Camps courses on ggplot2 are also wonderful.  GGPLOT2 has more capability than I have mastered or needed.  To be a