Re: [R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread William Dunlap via R-help
Re-importing the data with read.table's strip.white=TRUE argument may be an easier way to deal with the problem (if the problem is leading or trailing whitespace). Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Jun 1, 2017 at 9:17 AM, David Winsemius wrote: > > > On Jun 1, 2017, at 8:57 A

Re: [R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread Charles C. Berry
On Thu, 1 Jun 2017, Rui Barradas wrote: Hello, In order for us to help we need to know how you've imported your data. What was the file type? What instructions have you used to import it? Did you use base R or a package? Give us a minimal but complete code example that can reproduce your sit

Re: [R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread David Winsemius
> On Jun 1, 2017, at 8:57 AM, William Dunlap via R-help > wrote: > > Check for leading or trailing spaces in the strings in your data. > dput(dataset) would show them. This function would strip any leading or trailing spaces from a column: trim <- function (s) { s <- as.charac

Re: [R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread David L Carlson
: Thursday, June 1, 2017 11:07 AM To: Ulrik Stervbo ; Rui Barradas ; Tara Adcock ; r-help@r-project.org Cc: William Dunlap via R-help Subject: Re: [R] Data import R: some explanatory variables not showing up correctly in summary It looks like your printouts are based on the R summary() function

Re: [R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread David L Carlson
[mailto:r-help-boun...@r-project.org] On Behalf Of Ulrik Stervbo Sent: Thursday, June 1, 2017 10:50 AM To: Rui Barradas ; Tara Adcock ; r-help@r-project.org Subject: Re: [R] Data import R: some explanatory variables not showing up correctly in summary Hi Tara, It seems that you categorise and

Re: [R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread William Dunlap via R-help
Check for leading or trailing spaces in the strings in your data. dput(dataset) would show them. Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Jun 1, 2017 at 8:49 AM, Ulrik Stervbo wrote: > Hi Tara, > > It seems that you categorise and count for each category. Could it be that > the met

Re: [R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread Ulrik Stervbo
Hi Tara, It seems that you categorise and count for each category. Could it be that the method you use puts everything that doesn't match the predefined categories in Other? I'm only guessing because without a minimal reproducible example it's difficult to do anything else. Best wishes Ulrik R

Re: [R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread Rui Barradas
Hello, In order for us to help we need to know how you've imported your data. What was the file type? What instructions have you used to import it? Did you use base R or a package? Give us a minimal but complete code example that can reproduce your situation. Hope this helps, Rui Barradas

[R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread Tara Adcock
Hi, I have a question regarding data importing into R. When I import my data into R and review the summary, some of my explanatory variables are being reported as if instead of being one variable, they are two with the same name. See below for an example; Behav person Behav dog