[R] Spicing Up Native Circular Plot Using ggplot2

2016-05-01 Thread Sidoti, Salvatore A.
I have some angle data from an animal behavior study that I would like to plot for publication using ggplot2. What follows is my current workflow with some example data. ### BEGIN SCRIPT ### ### Create two data frames of random Cartesian coordinates ### df1 <- data.frame( x = sample(10, 11, rep

Re: [R] inserting row(column) in array or dataframe at specified row(column)

2016-05-01 Thread David Winsemius
> On May 1, 2016, at 10:53 AM, Jan Kacaba wrote: > > Hello dear R users, > > Is there a function or package which can insert row, column or array in > another array at specified place (row or column)? > > I have made several attempts at this function optimizing both speed, code > readability a

Re: [R] row names, coulmn names

2016-05-01 Thread David Winsemius
> On May 1, 2016, at 11:09 AM, Jan Kacaba wrote: > > Hello dear R helpers, > > Is it possible to have more than 1 row for column names in data.frame, > array, tbl_df? I would like to have column numbers in the first row, string > names in the second row, physical unit in third row. It's possib

Re: [R] Aggregate FIPS data to State and Census divisions

2016-05-01 Thread David Winsemius
> On May 1, 2016, at 9:30 AM, Miluji Sb wrote: > > Dear Dennis, > > Thank you for your reply. I can use the dplyr/data.table packages to > aggregate - its the matching FIPS codes to their states that I am having > trouble. Thanks again. So post some example code that demonstrate you paid atten

Re: [R] inserting row(column) in array or dataframe at specified row(column)

2016-05-01 Thread Tom Wright
If you can address your columns by name then order shouldn't matter. If the column order does matter, perhaps a matrix is a better structure to use? On Sun, May 1, 2016, 10:56 AM Jan Kacaba wrote: > Hello dear R users, > > Is there a function or package which can insert row, column or array in >

Re: [R] row names, coulmn names

2016-05-01 Thread Tom Wright
I think what you ask isn't ideal.Each column in a dataframe should be the same data type. While column names are stored in the first row when the df is exported to CSV, they are not stored as columns in the data frame. Instead the column names are stored as a separate attribute of the df. This is w

[R] row names, coulmn names

2016-05-01 Thread Jan Kacaba
Hello dear R helpers, Is it possible to have more than 1 row for column names in data.frame, array, tbl_df? I would like to have column numbers in the first row, string names in the second row, physical unit in third row. How would I do it? Derek [[alternative HTML version deleted]] ___

[R] inserting row(column) in array or dataframe at specified row(column)

2016-05-01 Thread Jan Kacaba
Hello dear R users, Is there a function or package which can insert row, column or array in another array at specified place (row or column)? I have made several attempts at this function optimizing both speed, code readability and ease of use. The functions are of following format: appcol=funct

Re: [R] Aggregate FIPS data to State and Census divisions

2016-05-01 Thread Miluji Sb
Dear Dennis, Thank you for your reply. I can use the dplyr/data.table packages to aggregate - its the matching FIPS codes to their states that I am having trouble. Thanks again. Sincerely, Milu On Sun, May 1, 2016 at 6:20 PM, Dennis Murphy wrote: > Hi: > > Several such packages exist. Given t

Re: [R] Removing NAs from dataframe (for use in Vioplot)

2016-05-01 Thread David Winsemius
> On May 1, 2016, at 12:15 AM, Mike Smith wrote: > On Apr 30, 2016, at 12:58 PM, Mike Smith wrote: > Hi > First post and a relative R newbie > I am using the vioplot library to produce some violin plots. > > DW> It's a package, not a library. > I have an

[R] Aggregate FIPS data to State and Census divisions

2016-05-01 Thread Miluji Sb
Dear all, I have the following data by US FIPS code. Is there a package to aggregate the data by State and Census divisions? temp <- dput(head(pop1,5)) structure(list(FIPS = c("01001", "01003", "01005", "01007", "01009" ), death_2050A1 = c(18.19158, 101.63088, 13.18896, 10.30068, 131.91798), deat

Re: [R] Removing NAs from dataframe (for use in Vioplot)

2016-05-01 Thread Mike Smith
>>> On Apr 30, 2016, at 12:58 PM, Mike Smith wrote: >>> Hi >>> First post and a relative R newbie >>> I am using the vioplot library to produce some violin plots. DW> It's a package, not a library. >>> I have an input CSV with columns off irregular length that contain NAs. I >>> wa