From ness.wall at hotmail.co.uk Tue Jan 3 22:24:32 2017 From: ness.wall at hotmail.co.uk (sarah.harding) Date: Tue, 3 Jan 2017 13:24:32 -0800 (PST) Subject: [datatable-help] Predictions and Poisson Message-ID: <1483478672787-4727833.post@n4.nabble.com> I have been asked to do the following task: /'Using the data-frame in DoctorVisits.Rda, perform a Poisson regression analysis of how number of visits to the doctor in the two week period varies as a function of age group (i.e. <30, 30-50, >50), sex and illness. Holding sex and number of illnesses constant at their mean values, what are the predicted rates of visits to a doctor over a two week period for different age groups.' / I have ran my Poisson regression... M.dr <- glm(visits ~ age.category + gender + illness, + data=DoctorVisits, + family=poisson) But now I am stuck on how to input gender as a constant mean in the prediction function. So far I have... predictor.values <- with(DoctorVisits, data.frame(age.category=c('<30', '30-50','>50'), illness=mean(illness), gender= *??????*) I do not know what to put in for the gender variable as I am dealing with factors. Will be grateful for the help. Thanks. -- View this message in context: http://r.789695.n4.nabble.com/Predictions-and-Poisson-tp4727833.html Sent from the datatable-help mailing list archive at Nabble.com. From niparisco at gmail.com Thu Jan 5 09:29:55 2017 From: niparisco at gmail.com (Nicolas Paris) Date: Thu, 5 Jan 2017 09:29:55 +0100 Subject: [datatable-help] Shuffle row-wise, column independently Message-ID: Hello, I d'like to shuffle row-wise, independently for each row : > dt1 a b c1 1 1 02 1 0 03 0 1 04 0 0 1 > dt1 a b c1 1 0 12 0 1 03 0 1 04 1 0 0 Is there a data.table way to do so ? Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.awam.jansen at gmail.com Thu Jan 5 14:20:14 2017 From: david.awam.jansen at gmail.com (banded08) Date: Thu, 5 Jan 2017 05:20:14 -0800 (PST) Subject: [datatable-help] Shuffle row-wise, column independently In-Reply-To: References: Message-ID: <1483622414086-4727871.post@n4.nabble.com> Maybe not the fastest of most efficient, but this should work for(ii in 1:dim(dt1)[1]) set(dt1, ii, 1:dim(dt1)[2] ,sample(dt1[ii])) -- View this message in context: http://r.789695.n4.nabble.com/Shuffle-row-wise-column-independently-tp4727865p4727871.html Sent from the datatable-help mailing list archive at Nabble.com. From niparisco at gmail.com Fri Jan 6 01:09:01 2017 From: niparisco at gmail.com (Nicolas Paris) Date: Fri, 6 Jan 2017 01:09:01 +0100 Subject: [datatable-help] Shuffle row-wise, column independently In-Reply-To: <1483622414086-4727871.post@n4.nabble.com> References: <1483622414086-4727871.post@n4.nabble.com> Message-ID: Hey, Thanks for suggestion but this didn't work. Method 1 : use of data.table / sample > set.seed(1); size <- 100000000; dt <- data.table::data.table("a"=c(1:size),"b"=rep(letters[1:10],size/10));head(dt);system.time( dt[,c("a","b"):=list(sample(a),sample(b))] );head(dt) a b 1: 1 a 2: 2 b 3: 3 c 4: 4 d 5: 5 e 6: 6 f utilisateur syst?me ?coul? 10.190 0.252 10.456 a b 1: 26550867 a 2: 37212390 b 3: 57285336 c 4: 90820777 e 5: 20168193 a 6: 89838965 h Method 2 : use of factor / data.table / sample > set.seed(1); size <- 100000000; dt <- data.table::data.table("a"=c(1:size),"b"=as.factor(rep(letters[1:10],size/10)));head(dt);system.time( dt[,c("a","b"):=list(sample(a),sample(b))] );head(dt) a b 1: 1 a 2: 2 b 3: 3 c 4: 4 d 5: 5 e 6: 6 f utilisateur syst?me ?coul? 9.271 0.276 9.559 a b 1: 26550867 a 2: 37212390 b 3: 57285336 c 4: 90820777 e 5: 20168193 a 6: 89838965 h Method 3: Use of internal / data.table / factor > set.seed(1); size <- 100000000; dt <- data.table::data.table("a"=c(1:size),"b"=as.factor(rep(letters[1:10],size/10)));head(dt);system.time( dt[,c("a","b"):=list(a[.Internal(sample(size, size, FALSE, NULL))],b[.Internal(sample(size, size, FALSE, NULL))])] );head(dt) a b 1: 1 a 2: 2 b 3: 3 c 4: 4 d 5: 5 e 6: 6 f utilisateur syst?me ?coul? 8.786 0.137 8.935 a b 1: 26550867 a 2: 37212390 b 3: 57285336 c 4: 90820777 e 5: 20168193 a 6: 89838965 h Method 4 (thanks for pointing it banded): set / factor / sample > set.seed(1); size <- 100000000; dt <- data.table::data.table("a"=c(1:size),"b"=as.factor(rep(letters[1:10],size/10)));head(dt);system.time({ set(dt,j="a",value=sample(dt$a)); set(dt,j="b",value=sample(dt$b))} );head(dt); a b 1: 1 a 2: 2 b 3: 3 c 4: 4 d 5: 5 e 6: 6 f utilisateur syst?me ?coul? 8.790 0.204 9.006 a b 1: 26550867 a 2: 37212390 b 3: 57285336 c 4: 90820777 e 5: 20168193 a 6: 89838965 h Method 5 use of a data.frame > set.seed(1); size <- 100000000; dt <- data.frame("a"=c(1:size),"b"=as.factor(rep(letters[1:10],size/10)));head(dt);system.time({ dt$a <- sample(dt$a);dt$b <- sample(dt$b) });head(dt); a b 1 1 a 2 2 b 3 3 c 4 4 d 5 5 e 6 6 f utilisateur syst?me ?coul? 8.755 0.152 8.921 a b 1 26550867 a 2 37212390 b 3 57285336 c 4 90820777 e 5 20168193 a 6 89838965 h sadly, data.table does not improve. sample is the bottleneck 2017-01-05 14:20 GMT+01:00 banded08 : > Maybe not the fastest of most efficient, but this should work > > for(ii in 1:dim(dt1)[1]) set(dt1, ii, 1:dim(dt1)[2] ,sample(dt1[ii])) > > > > -- > View this message in context: http://r.789695.n4.nabble.com/ > Shuffle-row-wise-column-independently-tp4727865p4727871.html > Sent from the datatable-help mailing list archive at Nabble.com. > _______________________________________________ > datatable-help mailing list > datatable-help at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/ > listinfo/datatable-help > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hannah.Bond at outlook.com Sun Jan 8 04:15:01 2017 From: Hannah.Bond at outlook.com (BondHR) Date: Sat, 7 Jan 2017 19:15:01 -0800 (PST) Subject: [datatable-help] What statistical test to use for species abundance between wet and dry season? Message-ID: <1483845301695-4727949.post@n4.nabble.com> Sorry if this question is trivial, I have a collection of camera trap data of recorded species during the rainy season and the dry season. I am confused how to lay out a table to import to R, do I have species down the left (then counts of how many of that species) and columns of wet season and dry season? Also, I am confused on what statistical test to use :( I've read so many books and websites and every thing seems to be contradicting each other, please can anyone help! -- View this message in context: http://r.789695.n4.nabble.com/What-statistical-test-to-use-for-species-abundance-between-wet-and-dry-season-tp4727949.html Sent from the datatable-help mailing list archive at Nabble.com. From suttoncarl at ymail.com Sun Jan 8 16:19:49 2017 From: suttoncarl at ymail.com (Carl Sutton) Date: Sun, 8 Jan 2017 15:19:49 +0000 (UTC) Subject: [datatable-help] What statistical test to use for species abundance between wet and dry season? In-Reply-To: <1483845301695-4727949.post@n4.nabble.com> References: <1483845301695-4727949.post@n4.nabble.com> Message-ID: <1782494545.520229.1483888789959@mail.yahoo.com> Really difficult to answer since I do not know what it really is you are attempting to determine.? It appears your data consists of:Long (tidy) format layout a) species- mode character or mode factor (categorical if you want them that way).? If you know how R treats factors and what functions to use for factors, then it's just a choice.? If not familiar with how R treats factors then definitely character and save yourself some unwelcome surprises b) season - same treatment as species, or perhaps better described by date???? Read the lubridate package vignette to learn how it makes working with dates simple. c) counts-numerical Wide data formata)? each species a column each per season? such as black bear- wet,turtle - dry etcb)? counts filing the columns along with numerous NA definitely an "untidy" data set but perhaps easiest to manually enter and verify? You can always use the data.table melt function to go from wide to long format when or if you want, or use cast to go the other way. Here is a toy example in the long format layout (I'm to lazy to type the wide one) #? critter pics library(data.table) library(lubridate) species <- c("bear","chipmunk","garter_snake","cardinal") date <- mdy(c("01-15-2016", "02-25-2016", "06-01-2016", "08-31-2016")) counts<- c(15,20,2,50) pics_data <- data.table(species,date,counts) pics_data str(pics_data) Data printout | species date counts 1: bear 2016-01-15 15 2: chipmunck 2016-02-25 20 3: garter_snake 2016-06-01 2 4: cardinal 2016-08-31 50 > str(pics_data) Classes ?data.table? and 'data.frame': 4 obs. of 3 variables: $ species: chr "bear" "chipmunck" "garter_snake" "cardinal" $ date : Date, format: "2016-01-15" "2016-02-25" ... $ counts : num 15 20 2 50 - attr(*, ".internal.selfref")= | | | | | > | | ?Carl Sutton On Saturday, January 7, 2017 8:15 PM, BondHR wrote: Sorry if this question is trivial, I have a collection of camera trap data of recorded species during the rainy season and the dry season. I am confused how to lay out a table to import to R, do I have species down the left (then counts of how many of that species) and columns of wet season and dry season? Also, I am confused on what statistical test to use :( I've read so many books and websites and every thing seems to be contradicting each other, please can anyone help! -- View this message in context: http://r.789695.n4.nabble.com/What-statistical-test-to-use-for-species-abundance-between-wet-and-dry-season-tp4727949.html Sent from the datatable-help mailing list archive at Nabble.com. _______________________________________________ datatable-help mailing list datatable-help at lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help -------------- next part -------------- An HTML attachment was scrubbed... URL: From Hannah.Bond at outlook.com Sun Jan 8 17:32:30 2017 From: Hannah.Bond at outlook.com (BondHR) Date: Sun, 8 Jan 2017 08:32:30 -0800 (PST) Subject: [datatable-help] What statistical test to use for species abundance between wet and dry season? In-Reply-To: <1782494545.520229.1483888789959@mail.yahoo.com> References: <1483845301695-4727949.post@n4.nabble.com> <1782494545.520229.1483888789959@mail.yahoo.com> Message-ID: Hi, thanks for the reply, at the moment my data is laid out like this; Species Wet Season Dry Season Jaguar 6 4 Ocelot 3 2 currassow 17 14 etc... I want to find out that if there is a significant difference between the abundance of all species in wet and dry seasons. I hope to find out that as the wet season is likely to be more profitable for both predators and prey so most of the species should be more abundant? Would it still be using a test for two samples? e.g. wilcoxon or t-test. thanks ________________________________ From: carlsutton [via R] Sent: 08 January 2017 15:20 To: BondHR Subject: Re: What statistical test to use for species abundance between wet and dry season? Really difficult to answer since I do not know what it really is you are attempting to determine. It appears your data consists of: Long (tidy) format layout a) species- mode character or mode factor (categorical if you want them that way). If you know how R treats factors and what functions to use for factors, then it's just a choice. If not familiar with how R treats factors then definitely character and save yourself some unwelcome surprises b) season - same treatment as species, or perhaps better described by date??? Read the lubridate package vignette to learn how it makes working with dates simple. c) counts-numerical Wide data format a) each species a column each per season such as black bear- wet,turtle - dry etc b) counts filing the columns along with numerous NA definitely an "untidy" data set but perhaps easiest to manually enter and verify? You can always use the data.table melt function to go from wide to long format when or if you want, or use cast to go the other way. Here is a toy example in the long format layout (I'm to lazy to type the wide one) # critter pics library(data.table) library(lubridate) species <- c("bear","chipmunk","garter_snake","cardinal") date <- mdy(c("01-15-2016", "02-25-2016", "06-01-2016", "08-31-2016")) counts<- c(15,20,2,50) pics_data <- data.table(species,date,counts) pics_data str(pics_data) Data printout species date counts 1: bear 2016-01-15 15 2: chipmunck 2016-02-25 20 3: garter_snake 2016-06-01 2 4: cardinal 2016-08-31 50 > str(pics_data) Classes ?data.table? and 'data.frame': 4 obs. of 3 variables: $ species: chr "bear" "chipmunck" "garter_snake" "cardinal" $ date : Date, format: "2016-01-15" "2016-02-25" ... $ counts : num 15 20 2 50 - attr(*, ".internal.selfref")= > Carl Sutton On Saturday, January 7, 2017 8:15 PM, BondHR <[hidden email]> wrote: Sorry if this question is trivial, I have a collection of camera trap data of recorded species during the rainy season and the dry season. I am confused how to lay out a table to import to R, do I have species down the left (then counts of how many of that species) and columns of wet season and dry season? Also, I am confused on what statistical test to use :( I've read so many books and websites and every thing seems to be contradicting each other, please can anyone help! -- View this message in context: http://r.789695.n4.nabble.com/What-statistical-test-to-use-for-species-abundance-between-wet-and-dry-season-tp4727949.html Sent from the datatable-help mailing list archive at Nabble.com. _______________________________________________ datatable-help mailing list [hidden email] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help _______________________________________________ datatable-help mailing list [hidden email] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help Carl Sutton ________________________________ If you reply to this email, your message will be added to the discussion below: http://r.789695.n4.nabble.com/What-statistical-test-to-use-for-species-abundance-between-wet-and-dry-season-tp4727949p4727957.html To unsubscribe from What statistical test to use for species abundance between wet and dry season?, click here. NAML -- View this message in context: http://r.789695.n4.nabble.com/What-statistical-test-to-use-for-species-abundance-between-wet-and-dry-season-tp4727949p4727958.html Sent from the datatable-help mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From boris05036 at gmail.com Sun Jan 8 20:01:52 2017 From: boris05036 at gmail.com (Boris05036) Date: Sun, 8 Jan 2017 11:01:52 -0800 (PST) Subject: [datatable-help] Sumif Message-ID: <1483902112680-4727959.post@n4.nabble.com> Hello! I am new in R and have a task. I have a massive, for example: region price 1 100 2 100 1 150 3 200 2 100 1 150 3 150 and so on. I need to make 2 tables, that describes in descending order: 1) quantity of rows for each region, 2) sum of prices in each region -- View this message in context: http://r.789695.n4.nabble.com/Sumif-tp4727959.html Sent from the datatable-help mailing list archive at Nabble.com. From harshalnaidu at yahoo.com Mon Jan 16 07:39:46 2017 From: harshalnaidu at yahoo.com (harshalnaidu) Date: Sun, 15 Jan 2017 22:39:46 -0800 (PST) Subject: [datatable-help] Read tabular data from somewhere in text file into data table Message-ID: <1484548786422-4728127.post@n4.nabble.com> file1.txt I want to read only the tabular data from the attached text file into a data table. Any tips on how to extract only tables into data frames in cases where table is somewhere between other text? The position of the tabular data will vary. -- View this message in context: http://r.789695.n4.nabble.com/Read-tabular-data-from-somewhere-in-text-file-into-data-table-tp4728127.html Sent from the datatable-help mailing list archive at Nabble.com. From suttoncarl at ymail.com Wed Jan 18 02:27:39 2017 From: suttoncarl at ymail.com (Carl Sutton) Date: Wed, 18 Jan 2017 01:27:39 +0000 (UTC) Subject: [datatable-help] melt spread References: <1096506642.5044240.1484702859667.ref@mail.yahoo.com> Message-ID: <1096506642.5044240.1484702859667@mail.yahoo.com> Hi This question is for information, not a coding problem. Basic information: The data table I am attempting to melt has 363 columns and 85,074 rows (246.5MB).? The first 14 are id variables and pose no problem.? One of the measure vars has sequences of 2:9,? The other 34 have sequence of 1:10.?? think paste0("var_",1:10) What works: It is a simple matter to melt these measure var columns using columns 15:363.?? Thanks to an answer on a prior question I can use tstrsplit to split the sequence number off the column heading,?? So far, so good.? The difficulty: The problems arises when I attempt to spread the variable column which contains prior column names sans sequence numbers.?? I have searched but not found a data.table function to spread the contents of "variable" into separate columns.? The tidyr "spread" command maxes out my available memory of 12GB.? I have attempted to use patterns to melt into separate columns but that results in column names of valuex, not the original column name.? In searching the arguments for melt I have not seen one for preserving the original column names.? Perhaps I missed something? The solution: Am I stuck with either ????a)? splitting my data.table such that tidyr does not max out available memory, or??? b)? use set names on 35 columns to get viable column names? ?Any and all thoughts are appreciated.? I have 20 of these datasets to mung and am starting on one of the smaller ones.? The goal is write the code once and use it on all datasets. Carl Sutton -------------- next part -------------- An HTML attachment was scrubbed... URL: From mel at mbacou.com Wed Jan 18 05:17:10 2017 From: mel at mbacou.com (Bacou, Melanie) Date: Tue, 17 Jan 2017 23:17:10 -0500 Subject: [datatable-help] melt spread In-Reply-To: <1096506642.5044240.1484702859667@mail.yahoo.com> References: <1096506642.5044240.1484702859667.ref@mail.yahoo.com> <1096506642.5044240.1484702859667@mail.yahoo.com> Message-ID: <36994128-2b8c-5c36-77ed-51b56a1b2afb@mbacou.com> Carl, Have you look into the data.table::dcast function to reshape tables from long to wide formats? See e.g. ftp://cran.r-project.org/pub/R/web/packages/data.table/vignettes/datatable-reshape.html --Mel. On 1/17/2017 8:27 PM, Carl Sutton wrote: > Hi > > This question is for information, not a coding problem. > > Basic information: > The data table I am attempting to melt has 363 columns and 85,074 rows > (246.5MB). The first 14 are id variables and pose no problem. One of > the measure vars has sequences of 2:9, The other 34 have sequence of > 1:10. think paste0("var_",1:10) > > What works: > It is a simple matter to melt these measure var columns using columns > 15:363. Thanks to an answer on a prior question I can use tstrsplit > to split the sequence number off the column heading, So far, so good. > > The difficulty: > The problems arises when I attempt to spread the variable column which > contains prior column names sans sequence numbers. I have searched > but not found a data.table function to spread the contents of > "variable" into separate columns. The tidyr "spread" command maxes > out my available memory of 12GB. I have attempted to use patterns to > melt into separate columns but that results in column names of valuex, > not the original column name. In searching the arguments for melt I > have not seen one for preserving the original column names. Perhaps I > missed something? > > The solution: > Am I stuck with either > a) splitting my data.table such that tidyr does not max out > available memory, or > b) use set names on 35 columns to get viable column names? > Any and all thoughts are appreciated. I have 20 of these datasets to > mung and am starting on one of the smaller ones. The goal is write > the code once and use it on all datasets. > > Carl Sutton > > > _______________________________________________ > datatable-help mailing list > datatable-help at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help -------------- next part -------------- An HTML attachment was scrubbed... URL: From assiduous.grumbler at hotmail.com Wed Jan 18 07:57:42 2017 From: assiduous.grumbler at hotmail.com (assiduous.grumbler) Date: Tue, 17 Jan 2017 22:57:42 -0800 (PST) Subject: [datatable-help] javascript form submission Message-ID: <1484722662335-4728170.post@n4.nabble.com> we are working on some project to simulate js form submission online and then get the return html code to create a datamart for text mining later. the latter part is already completed but we do not know if there are any packages to help us to do bulk form submission. is there any existing packages that we can use? sorry if this is not the correct forum. new to the site. thank you. -- View this message in context: http://r.789695.n4.nabble.com/javascript-form-submission-tp4728170.html Sent from the datatable-help mailing list archive at Nabble.com. From suttoncarl at ymail.com Thu Jan 19 22:36:37 2017 From: suttoncarl at ymail.com (Carl Sutton) Date: Thu, 19 Jan 2017 21:36:37 +0000 (UTC) Subject: [datatable-help] tstrsplit throwing error after melt References: <1100931539.744926.1484861797655.ref@mail.yahoo.com> Message-ID: <1100931539.744926.1484861797655@mail.yahoo.com> Hi I had thought I was finished with this aspect of the project but yesterday this error appeared.? Error in strsplit(as.character(x), ...) : object 'variable' not found This occurs immediately after melting a 363 column data table. A head of the data shows : > head(races_1$variable) [1] raceDate_1 raceDate_1 raceDate_1 raceDate_1 raceDate_1 raceDate_1 116 Levels: raceDate_1 raceDate_2 raceDate_3 raceDate_4 ... Winner_7 Now admittedly melt returns the variable column as a factor, but that works just fine with toy data. I am perplexed why it bombs on real data. The error message appears non nonsensical because it is obvious the column does exist. Also, since the error specifies STRSPLIT, not TSTRSPLIT, it just may be one of the base nonsensical error messages. Helpful to know there is an error, but.... Here is the code leading up to this error: suppressMessages(library(data.table)) races.names <- colnames(races) id_vars <- races.names[1:14] measure_vars <- races.names[15:363] # yes, I have to reset the mode afterwords. system.time(races_1 <-melt(races, id = id_vars, measure = measure_vars)) # Separate variable name from prior race numbers # sequence (1:10) races_1 <- races[, c("MPdata","PriorRaceSeq") := tstrsplit(variable, "_")] ??????? > races_1 <- races[, c("MPdata","PriorRaceSeq") := + tstrsplit(variable, "_")] Error in strsplit(as.character(x), ...) : object 'variable' not found ??? And data str after this > str(races_1) Classes ?data.table? and 'data.frame': 48511 obs. of 16 variables: $ TrackToday : chr "AQU" "AQU" "AQU" "AQU" ... $ DateToday : int 20120101 20120101 20120101 20120101 20120101 20120101 20120101 20120101 20120101 20120101 ... $ RaceNumberToday : int 1 1 1 1 1 1 1 1 2 2 ... $ PostPositionToday : int 1 2 3 4 5 6 7 8 1 2 ... $ DistanceToday : int 1320 1320 1320 1320 1320 1320 1320 1320 1320 1320 ... $ SurfaceToday : chr "d" "d" "d" "d" ... $ RaceTypeToday : chr "AO" "AO" "AO" "AO" ... $ RaceClassToday : chr "OClm 50000nw1" "OClm 50000nw1" "OClm 50000nw1" "OClm 50000nw1" ... $ PurseToday : int 51000 51000 51000 51000 51000 51000 51000 51000 60000 60000 ... $ ClaimingPriceToday: int 50000 50000 50000 50000 50000 50000 50000 50000 NA NA ... $ MorningLineOdds : num 2 20 4 30 2.5 8 5 15 20 2 ... $ HorseName : chr "FUNKY MUNKY MAMA" "STARSHIP WARPSPEED" "SIGGI THE ALIEN" "SHANDREA" ... $ HDWrunStyle : chr "E " "P " "EP " "E " ... $ DaysSinceLastRace : int 78 45 31 17 39 30 17 50 NA NA ... $ variable : Factor w/ 349 levels "raceDate_1","raceDate_2",..: 1 1 1 1 1 1 1 1 1 1 ... $ value : chr "20111015" "20111117" "20111201" "20111215" ... - attr(*, ".internal.selfref")= Toy data that works thanks to prior help request: ?library(data.table) library(tidyr) # data table for melt and columns split dt1 <- data.table(a_1 = 1:10, b_2 = 20:29,folks = c("art","brian","ed", "rich","dennis","frank", "derrick","paul","fred","numnuts"), a_2 = 2:11, b_1 = 21:30) melted <- melt(dt1, id = "folks")[,c("varType","varIndex") := tstrsplit(variable,"_")][,variable:=NULL] What is also puzzling is that the next statement sets column "variable" to NULL and that works. Thus logic says it is not the column that is missing but "something" else entirely. Any ideas greatly appreciated. Carl Sutton -------------- next part -------------- An HTML attachment was scrubbed... URL: From dal64372 at ufl.edu Fri Jan 27 16:18:34 2017 From: dal64372 at ufl.edu (dal64372) Date: Fri, 27 Jan 2017 07:18:34 -0800 (PST) Subject: [datatable-help] Using lsmeans function with linear models using asreml Message-ID: <1485530314978-4728402.post@n4.nabble.com> I am running a linear model in R using the asreml function, and as part of an assignment need to also run the lsmeans function, however when I do I get an error message ("Can't handle an object of class "asreml"). Is there any way to run lsmeans when the linear model is fit using the asreml function? Thanks for your help! -- View this message in context: http://r.789695.n4.nabble.com/Using-lsmeans-function-with-linear-models-using-asreml-tp4728402.html Sent from the datatable-help mailing list archive at Nabble.com.