Re: [R] R-help mailing list activity / R-not-help?

2016-01-25 Thread jwd
On Mon, 25 Jan 2016 12:33:12 -0800
Hasan Diwan  wrote:

> There exists a fine line between being unintentionally rude, but
> helpful and purposely putting someone down. -- H

The line is really not "fine" at all since it lies in that word
"purposely."  Also, you've associated "helpful" with unintentional
rudeness.  The distinction you've drawn is clear.

JWDougherty

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R-help mailing list activity / R-not-help?

2016-01-25 Thread jwd
On Mon, 25 Jan 2016 11:06:35 -0500
Oliver Keyes  wrote:

> +1. And frankly I would like to suggest that there is another obvious
> solution here; pairing a set of guidelines around expected user
> behaviour with removing people from the mailing list, or moderating
> them, if they do not think that creating a non-toxic environment is
> good.
> 

The problem is defining a "toxic environment."  One person can find all
kinds of offense and rudness in something where another would
be appreciating a short, concise response, such as a suggestion to "read
the manual." "Toxic" is personal and one can find it wherever one
looks, if so minded. I suspect that if one perceives rudeness, one
ought to check and see that we haven't left our sensibilities out in
the traffic pattern where they are bound to be trampled.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Regular R freezes

2015-12-22 Thread jwd
On Tue, 22 Dec 2015 16:13:07 +0100
Tim Richter-Heitmann  wrote:

> Dear List,
> 
> some days ago my R started to regularily freezes, especially during 
> these operations:
> 
> mso(,permutations=999), package vegan
> anova.cca(), package vegan
> forward.sel(), package packfor
> 
> I am running R on a 64-bit Windows 7 installation, 4 cores, 8 GB RAM.
> I just today updated R to 3.2.3, all packages, and R-Studio to their 
> most recent versions.
> Still the error persists.
> Two things are strange:
> 
> All these functions (and more) have been working without any problem
> for 2 years.
> The freezes occur at different points in the algorithms. For 
> forward.sel(), a stepwise variable selection process
> in species distribution modelling, the system fails at different
> steps (say after variable 8 or 18), but inevitably fails.

Look at how much memory is available.  Possibly increase the work space
available to R.  What other software was recently changed immediately
prior to the appearance of the problem.  Lastly, check that hardware it
self.  Most hard drives have diagnostic routines that can be accessed
to check drive integrity.  

The random nature to the fail suggests a memory availability problem -
some newly resident routine that uses more memory than it should.  Run
the Task Manager in monitor memory availability before, and at
failure.  But, I once chased a similar problem all the way to a failing
CPU before fixing it. I essentially rebuilt the computer.  


> R-Studio is still responsive meanwhile, but the "Stop"-Buttom does
> not work, and the programm needs to be restarted.
> 
> Is there any way of troubleshooting or finding out who the culprit is?
> 
> Thanks.
> 

JWDougherty

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Make a box-whiskers plot in R with 5 variables, color coded.

2015-12-16 Thread jwd
On Wed, 16 Dec 2015 09:34:20 -0600
Hadley Wickham  wrote:

> On Tue, Dec 15, 2015 at 9:55 AM, Martin Maechler
>  wrote:
> >
> >
> >[]
> >
> > > You are missing the closing bracket on the boxplot()
> > > command.  Just finish with a ')'
> >
> > Hmm... I once learned
> >
> >  '()' =: parenthesis/es
> >  '[]' =: bracket(s)
> >  '{}' =: brace(s)
> >
That is correct, though I've generally heard braces heard called
"curly braces."

JWDougherty

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Make a box-whiskers plot in R with 5 variables, color coded.

2015-12-16 Thread jwd
On Wed, 16 Dec 2015 07:16:21 -0800
John Kane  wrote:

...
> 
> I have lived next door to the USA for most of my life and never
> realized that American usage is 'brackets' for  [ ] .  I would use
> the term brackets in normal use for ( ) and "square brackets for [ ]. 
> ...

There's a lot of fog in the air.  Properly, the use in the USA is as
described by Martin.  But ever since the late '60s there has been a
de-emphasis of linguistic precision and a tendency to "good enough."
Sad.

JWDougherty

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] CRAN - Package "activity" - how do you convert time (hh:mm) into radians in R 3.1.2 on Windows 7 OS 64bit

2015-11-04 Thread jwd
On Wed, 4 Nov 2015 09:02:46 +0100
Martin Maechler  wrote:

> > Bert Gunter 
> > on Tue, 3 Nov 2015 14:54:46 -0800 writes:
> 
> > ... should have said: with a 24 hour "clock".
> > -- Bert
> > Bert Gunter
> 
> Hmm,  thank you Bert.
> 
> I know nothing about measuring time in radians, and for me,
> 'radians' are angles, and hence we are talking about
> analogue watches when measuring time with them, and now, as a
> citizen from  "the watch maker country" I do like analogue
> watches or let's nowadays say "graphical" watches, i.e., with clock
> faces and short and long (hour and minute) hands, and I think I
> have only ever seen 12 h watches at least on church towers (yes,
> here in CH) or wrist watches...
> (?)
> 
> Martin

The issue is apparently to analyze activity over a 24 hour cycle.  The
OP mentions the use of a camera trap so they are evidently analyzing
trap events by time of event.  The radian constraint is mentioned in
the Activity package docs.  

JWDougherty

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Unable to run RcmdrPlugin.survival using 3.2.2 with Windows 10

2015-09-04 Thread jwd
On Fri, 4 Sep 2015 21:07:19 +1000
"Joyaa Antares"  wrote:

> Dear John,
> 
> Very many thanks.  Your hypothesis was completely correct - I did
> save the workspace, and this is what created the problem.   As a
> newbie, being part way through an "exercise", saving my workspace
> intuitively seemed the right thing to do.   Clearly not!So now,
> before I closed R and Rcmdr, I copied and pasted from Rcmdr's script
> file into a MS Word document, added a few comments (with preceding
> #), and then closed without otherwise saving R's script, output,
> workspace or markdown.  I hope this is reasonable practice. If not, I
> would be grateful for guidance on this.
> 
> Once again, very many thanks.  Joyaa
> 
A potentially useful piece of advise is to avoid using MSWord as a text
editor.  I don't use Rcmdr, but text files, particularly CSVs are
extremely useful in R as data files.  Scripts should be pure text as
well.  Word demands that you keep this in mind at all times.  It won't
default to a simple text mode.  You can use notepad, which MS provides
as a stopgap, though I would recommend a more capable programmer's text
editor such as Notepad++, a very useful GPL-licensed text editor for
Windows, which can be downloaded for free.

JWDougherty

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] what constitutes a 'complete sentence'?

2015-07-05 Thread jwd
On Fri, 3 Jul 2015 11:09:54 +0300
Federico Calboli federico.calb...@helsinki.fi wrote:

 Hi All,
 
 I am upgrading a package for CRAN, and I get this note:
 
 checking DESCRIPTION meta-information ... NOTE
 Malformed Description field: should contain one or more complete
 sentences.
 
 This is puzzling because:
 
 cat DESCRIPTION
 
 ...
 Description: Functions designed to test for single gene/phenotype
 association and for pleiotropy on genetic and genomic data. ...
 
 In my understanding Functions designed to test for single
 gene/phenotype association and for pleiotropy on genetic and genomic
 data.” *is* a complete sentence.  So, what is complete sentence in
 the opinion of whomever coded that check?
 
 Best
 
 F

Well, no.  It isn't a complete sentence which requires a subject, and
object and a verb.  However, there are not many package Descriptions
that ARE complete sentences.  Some could be reworded awkwardly into a
functional sentence.  You could for instance try:

 [Library/Package name] is a collection of functions designed to test
 for pleiotropy on genetic and genomic data.

That is a complete sentence as it contains a form of the
verb to be, to whit is.  By using the package name you also avoid
the stricture against The package consists ...

JWdougherty

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] not a Stata version 5-12 .dta file

2015-03-20 Thread jwd
On Thu, 19 Mar 2015 15:00:18 -0400
Nicole Ford nicole.f...@me.com wrote:

 Hello,
 
 I recently updated to the newest version of R and I am encountering
 issues.  Please find my error and session info below.  My data are
 attached.  I have tried the readstata13 package just in case to no
 avail.  Unless I am missing something, google isn’t helping.
 
It would not hurt to type in:

?read.dta 

and read the result.

JWDougherty

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] R vs. RStudio?

2015-01-11 Thread jwd
On Sat, 10 Jan 2015 21:22:56 -0500
Boris Steipe boris.ste...@utoronto.ca wrote:

 Could someone kindly enlighten me whether there are currently
 advantages to use R Studio vs. the normal R GUI? On the Mac I can't
 seem to find anything compelling, on Windows (which I don't use
 myself) I noticed last year that there seems to be no syntax
 highlighting available for the R GUI but R Studio had it.
 
 Surely there must be some value proposition in that project, what am
 I missing?
 
 Thanks,
 Boris 

There are pros and cons as with all things.  RStudio in so far R itself
is concerned is effectively simply a graphic interface for the
terminal.  You operate R from within RStudio essentially the same as
you would from a terminal.  Useful traits include a streamlined means
of installing new packages without trolling through CRAN, quick
displays of data sets and other objects currently in the work
environment, and a very handy way to build scripts for an analysis.
Commands can be run from the Console window and copied to an *.R
script which can then be fine tuned to produce analytical, tabular and
graphical output to files that is readily incorporated into a
comprehensive analysis and report.  Graphics - plots - are created and
buffered in sequence and can be saved from the plot window as image
files or pdfs without adding device() lines to the script.  A nice
addition would be an output window similar to the plot window.  As it
is, I still use sink() to capture output of tables and analytical
results.  RStudio does have some highlighting.  The biggest gotcha is
that R is not precisely the same experience under different
environments (e.g. linux vs. windows).  RStudio is more consistent
across platforms.

RStudio is not an environment like RKward or JGR where analytical tools
are available through a menu.

jwdougherty

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Can not save files

2015-01-02 Thread jwd
On Wed, 31 Dec 2014 18:29:05 -0500
John Sorkin jsor...@grecc.umaryland.edu wrote:

 When I try to save a file, I get Permission denied. 
 Can someone let me know why this happens?
 
 
 I am running under Windows 7, Rstudio
 
 
  save(TheResults,file=c:\\data)

You are explicitly attempting to place a file named data in your root
directory.  You lack privileges to write into the root directory,
which action is the source of the permission denied message. Good
practice is to use a directory in your user-space such as a
subdirectory of Documents as indicated by Mr. Newmiller. Ideally you
should use getwd() and setwd() locate and set the directory where your
data and any saved files are placed.  If you are using are RStudio, it
is relatively simple do this under the Session/Set Working Directory
menu choices.  

JWDougherty

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Rose Diagrams for Geology

2014-11-21 Thread jwd
On Tue, 18 Nov 2014 22:06:03 -0600
David Doyle kydaviddo...@gmail.com wrote:

 Thank you to David and David for their help.  The code below
 generated what I needed.
 
 
 library(circular)
 mydata - read.table(http://doylesdartden.com/R/Joints.csv;,
 header=TRUE, sep=,,)
 x - circular(mydata$JointsRad)
 rose.diag(x,
 
   #Set point character to use
   pch = 20,
   #sets font size
   cex = 1,
   #parameter that controls the size of the circle.
   #1= default 1 makes it larger  makes it smaller
   shrink = 1,
   #the color for filling the rose diagram.
   col=2,
   prop = 2,
   # number of bins.  36 = 10 degrees each.  18 = 20 degree
 each bins=36,
   # Ticks showing bins
   ticks=TRUE,
   # Unites.
   units=degrees,
   # list main title
   main=Rose Diagram of XXX)
 # for more info see
 http://www.inside-r.org/packages/cran/circular/docs/rose.diag
 
I've been following this thread with some interest.  One problem that I
might have with the code above is that as it is, the plot is labeled
with 0-deg to the left, and numbered counter clockwise (standard
trigonometric format). Most field mapping data I have collected has been
either in quadrant form (rarely) or more commonly in azimuthal form
(0-360 degrees order clockwise from the top).  Is that an issue? 

jwdougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R/Ubuntu, “package ‘stats’ in options(”defaultPackages“) was not found”

2014-09-19 Thread jwd
On Thu, 18 Sep 2014 10:28:42 -0400
davide.chi...@gmail.com davide.chi...@gmail.com wrote:

 I tried with a different mirror, but nothing changed...
 
 Any other idea?
 
 Thanks anyway
 
 -- Davide

What is the output of library()?

JWDougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Why does debugging print() change output of function?

2014-09-06 Thread jwd
On Sat, 6 Sep 2014 15:31:49 -0700
David Winsemius dwinsem...@comcast.net wrote:

The only other difference I see is a missing semicolon in the second
example, which, in the first precedes your print() instruction.

JWDougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] converting dataframe into multiple time series

2014-08-24 Thread jwd
On Sun, 24 Aug 2014 09:52:35 +0900
Bill william...@gmail.com wrote:

 Hello. Can someone suggest how to do this:
 
 for (i in 2:length(colnames(allvar.df))) {
 var=colnames(allvar.df)[i]
 timeSeriesName = paste(var,.time.series)
 varRef=paste(var,.df$,var)
 varDate=paste(var,.df$date)
 timeSeriesName - ts(varRef,
 start = c(year(min(varDate)),month(min(varDate))),
 end = c(year(max(varDate)),month(max(varDate))),
 frequency=12)
 }
 
First, you should probably do some reading.  For starters look at
Modern Applied Statics with S by Venables and Ripley, possibly
Adler's R In a Nutshel and Maindonald and Brown's Data Analysis and
Graphics Using R, and definitely Shumway and Stoffer's Time Series
Analysis and Its Applications: With Examples in R.  READ the sections
on time series. You also want to look into - minimally - xts and zoo.
Depending on the nature of your data - examples are really necessary -
either xts or zoo may be what you want.  Or, you could simply export
each variable in your data.frame to a separate time series.  

JWDougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Installation of R version 3.1.0

2014-08-14 Thread jwd
On Thu, 14 Aug 2014 12:15:58 -0400
VG gupta567va...@gmail.com wrote:

 Hi Everyone,
 I am currently using *R version 3.0.0 RC (2013-03-28 r62434) --
 Masked Marvel*
 
 I am using Ubuntu 10.04 LTS- the Lucid Lynx.
 
 I downloaded the  tar.gz of R 3.1.0 under my Downloads folder.
 I changed my directory to Downloads folder and then used following
 commands to install the version.
 
 I used
 tar -xzf tar.gz
 cd R-3.1.0
 ./configure
 make
 make check
 
Currently you've compiled and verified compilation.  You need to
install it.  
Go to the R-3.10 directory, the one you compile from and run
sudo make install

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Update fail

2014-07-14 Thread jwd
I've been getting of an R-patched update, but running the process
results in the following:

File './x86_64/R-patched-devel-3.1.1-4.1.x86_64.rpm' not found on
medium
'http://download.opensuse.org/repositories/devel:/languages:/R:/patched/openSUSE_13.1/'


The system is opensuse 13.1, Linux 3.11.10-17

R reports as version 3.1.1 which seems to be the current release.

I'm not quite sure who is most appropriate to report this too.

Thanks,
JDougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Paper on Analytics using R

2014-07-11 Thread jwd
On Fri, 11 Jul 2014 14:17:23 +0800
Katherine Gobin katherine_go...@yahoo.com wrote:

 Dear R Forum,
 
 I am looking for some write-up or paper on Use of R for Analytics or
 why R should be preferred over others for Analytics purpose. Tried
 google but got some info about some commercial vendors using R for
 analytics. I am looking for some paper where no commercial flavor is
 given, I mean it deals with R strictly and doesn't talk about some
 product using R for analytics.
 
 Kindly share if you are aware of some writeups or paper.
 
 Regards
 
 Katherine

Try researching here.

http://www.jstatsoft.org/

JWDougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] C: drive memory full

2014-06-17 Thread jwd
On Tue, 17 Jun 2014 12:48:54 +
Hiyoshi, Ayako ayako.hiyoshi...@alumni.ucl.ac.uk wrote:

 Dear Martyn and Professor Ripley,
 
 Thank you so much for your help. I used Window's large file search
 (it was useful! thank you), but there is no big files detected in C:
 drive . Perhaps I will have to reinstall Windows..
 
The problem may not be R at all, but rather Windows.  How large is your
drive, not RAM but the actual drive?

If you can, examine your drive to see if there are either fragmentation
problems or hidden files taking up excess space.  Look at the
drive properties for C:\ and run disk clean-up if possible.  Another
problem, MS may have fixed this at some point - I don't run Win 8, is
that if your deleted files are not removed, you can run out of space.
Usually, the space occupied by a file marked for deletion should
be scavenged as Windows needs space, but sometimes that may not happen,
especially with a very full drive. So, if there are files in the
Wastebasket remove them completely.  Another space-use that can grow
to excess is a print spool. Even Windows uses a print spool and that can
grow too large for the system to function efficiently.  

JWdougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] distance by sea

2014-06-08 Thread jwd
On Thu, 5 Jun 2014 14:58:11 +0200
Giulia Fassio giuliafas...@gmail.com wrote:

 Hello,
 
 someone know if it is possible to use R to calculate distance by sea
 between two geographic coordinates? I have many points in the sea and
 I want to create a matrix using R of the length of trajectories that
 pass only trough sea.
 
 Thanks
 
 Giulia
 

You need to be a great deal more detailed before you are likely to get
useful advice.  Are you trying to track a sea mammal for example?  Or
are you working out the course for a sea vessel to travel?

JWDougehrty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Saving the ouput data

2014-05-18 Thread jwd
Or you can try help(sink).

JWDougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] dev-lang/R-3.1.0: biocLite(vsn) removes all files in /

2014-05-18 Thread jwd
On Sun, 18 May 2014 07:16:46 +0200
Juergen Rose r...@rz.uni-potsdam.de wrote:

What disappeared are links and three files.  The links are recreatable,
although they would be better placed in user space rather than
under /.  Of the three files, the *bz2 appears to be part of a Gentoo
release, the second a grub configuration backup - not needed, and the
last a log file.  While the locaton of these files and links might be
an idiosyncrasy of the Linux distribution you are using, most
distributions are inherently more careful in configuration.  You should
get into the habit of creating a user with more limited scope than root
and learn to use su and sudo if you need super-user rights.
Working from root could seriously imperil your system and your work's
integrity.  

JWDougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] how to replace NA values

2014-01-20 Thread jwd
On Sun, 19 Jan 2014 11:39:43 -0800 (PST)
kingsly ecoking...@yahoo.co.in wrote:

 Dear R community
  
 I have a large data set contain some empty cells. Because of that,
 may be I am wrong, NA values are produced. Now I want replace both
 empty and NA values with zero. 
 Elder1 - data.frame(
   ID=c(ID1,ID2,ID3,ID6,ID8),
   age=c(38,35,,NA,NA))
 Output I am expecting
  
 ID   age
 ID1  38
 ID2  35
 ID3  0
 ID6  0
 ID8  0
  
 In advance I thank your help.
 
The age variable is being read in as a factor because of the 
.  If you were to replace it with NA, the type becomes numerical:

Before replacement:

str(Elder1)
'data.frame':   5 obs. of  2 variables:
 $ ID : Factor w/ 5 levels ID1,ID2,ID3,..: 1 2 3 4 5
 $ age: Factor w/ 3 levels ,35,38: 3 2 1 NA NA

Notice that the  is treated as a factor level.

After:

str(Elder1)
'data.frame':   5 obs. of  2 variables:
 $ ID : Factor w/ 5 levels ID1,ID2,ID3,..: 1 2 3 4 5
 $ age: num  38 35 NA NA NA

SO, the question, is what do you want to do with that column?  An NA
value tells you honestly that the information is missing.  Replacing it
with a zero can be misleading and can bias some basic parameter
estimates.

After you know how you want to treat the data in that field, you may
have a better idea of how to handle the missing data.

JWD

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Where did lost variables go

2014-01-02 Thread jwd
On Mon, 30 Dec 2013 20:42:53 -0500
David Parkhurst parkh...@indiana.edu wrote:

 I have several variables in a data frame that aren't listed by ls() 
 after I attach that data frame.  Where did they go, and how can I
 stop the hidden ones from masking the local ones?
 Thanks for any help.
 David
 
You really need to offer more information, e.g. a reproducible example
that includes just how how moved data into your data frame. As
it is, the only reasonable suggestion is to try and find your lost
singleton socks, the missing variablee may be hiding with them.
Alternatively the lost variables may have taken off to Never Never Land
to hang with the Lost Boys.

One simple possibility is that the missing variables were actually
never read in to the data frame.  Have you ever seen those variables
in your data frame?  Did you try str(dataframe)?

As regards hidden and local, you'll - again - have to be a good
deal more explicit.  

JDougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Basic misunderstanding, or problem with my installation?

2014-01-02 Thread jwd
On Tue, 31 Dec 2013 19:51:06 -0500
Gabor Grothendieck ggrothendi...@gmail.com wrote:

...
 
 The assignment operator is TWO characters: a less than sign
 immediately followed by a minus sign.  Try copying and pasting this:
 
 x - 3
 x
 

Actually, you can use the = sign as well.

X = 3

works the same as

X - 3

and uses two fewer keystrokes if you're lazy enough to care about such
things -like me.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Help with removing extra legend elements in ggplot

2013-11-24 Thread jwd
On Tue, 19 Nov 2013 16:44:11 -0700
Matthew Van Scoyoc sco...@gmail.com wrote:

You want to consider this as a programming bug in your code.  Executing
each line sequentially shows that the problem appears in the second
line:

nmds.fig + geom_point(aes(color = VegType, shape = VegType, size = 10))

?aes() and ?geom_point() reveals a misplaced right parenthesis. Size
belongs to geom_point(), not aes() as you have it grouped.

jwdougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Bar Graph

2013-11-12 Thread jwd
On Mon, 11 Nov 2013 18:02:19 +0300
Keniajin Wambui kiang...@gmail.com wrote:

 I am using R 3.0.2 on a 64 bit machine
 
 I have a data set from 1989-2002. The data has four variables
 serialno, date, admission ward, temperature and bcg scar.
 
 serialno admin_ward date_admn bcg_scar temp_axilla yr
 70162Ward2 11-Oct-89   y   38.9 1989
 70163 Ward111-Oct-91   y 37.2 1991
 70164 Ward2   11-Oct-92n   37.3 1992
 70165 Ward111-Oct-93y38.9 1993
 70166 Ward1   11-Oct-94  y  37.7 1994
 70167  Ward1   11-Oct-95  y  40 1995
 
 
 I want to do a bar graph of total data (serialno) vs *(data of one of
 the variables) to show the available data vs total data over the years
 
 i am using
 
 gplot(dta, aes(temp_axilla, fill=admin_ward)) + geom_bar() +
   facet_grid(. ~ yr, scales = free,margins=F) +
 geom_histogram(binwidth=300)
 
 But can include the serialno which shows the data. how can I achieve
 this
 

You really need to pay better attention somewhere.  There are six
variables in your example table for instance, not four.  You state you
want to do something with the serialno variable, but it is not used 
in your bit of code.  Also, given that serialno appears to be
unique in your example, a bar graph would be singularly uninformative.

You need to provide a better example of the data, and an actual example
of the code you are trying to use, including the libraries you've
loaded.  

jwdougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Help on error (Error: could not find function kernelUD)

2013-11-06 Thread jwd
On Tue, 5 Nov 2013 16:22:26 -0700
Angela Dwyer angela.dw...@rmbo.org wrote:

You didn't forget to load the library did you?  The bit of output you
provide doesn't show a library(adehabitat) line.  That needs to be run
before the function can be found.

JWDougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] pie graphs in log scale axis

2013-10-28 Thread jwd
On Mon, 28 Oct 2013 13:40:51 +
Ortiz, John ort...@si.edu wrote:

 
 Dear list users,
 
 
 I'm doing a plot integrating Grid output with Base Graphics output
 (gridBase, Murrell 2012).
 
 My goal is to produce a xy plot where each point is represented by a
 pie.  I could get it using the attach code, but now I want to change
 the X axis to log scale.
 
 when I introduce the log=x parameter in the line:
 
 plot(x, y, xlim=c(0.1, 1.2), log=x, ylim=c(0.1, 1.2), type=n)
 
 I get this warning!
 
 vps - baseViewports()
 Warning message:
 In baseViewports() : viewport scales NOT set to user coordinates
 
It is not clear what you want.  Why is there an 'x = log' term in
plot()?  If you want to plot log(x) try using:

plot(log(x), y, xlim=c(0.1, 1.2), ylim=c(0.1, 1.2), type=n)

That generates an x/y plot with pies at various points.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] pie graphs in log scale axis

2013-10-28 Thread jwd
On Mon, 28 Oct 2013 15:03:36 -0700
jwd j...@surewest.net wrote:

 On Mon, 28 Oct 2013 13:40:51 +
 Ortiz, John ort...@si.edu wrote:
...
  
 It is not clear what you want.  Why is there an 'x = log' term in
 plot()?  If you want to plot log(x) try using:

Got that backward typing, should be log = x

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Code Book from SPSS Data

2013-10-27 Thread jwd
On Sun, 27 Oct 2013 14:37:27 -0700 (PDT)
Peter Maclean pmaclean2...@yahoo.com wrote:

It's not fully clear what you need, but, as I very vaguely recall, the
code book in SPSS provided labels for what are called levels in
factors in R, which are categorical variables. 

Try: ??categorical at the prompt for starters.

Then ?factor

JWDougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Quick advice on loading packages

2013-10-22 Thread jwd
On Mon, 21 Oct 2013 19:32:17 -0400
Data Analytics Corp. w...@dataanalyticscorp.com wrote:

 Hi,
 
 I need some quick advice/help on loading packages.  I want to write a 
 simple function to load a number of packages I intend to use at a 
 conference presentation.  I'm thinking of something like:
 
  fn.install - function(){install.packages(c(ggplot2, 
 scales),  repos = c:\\temp)}
 
 There will be many more than just the two I listed.  All the zip
 files are in a Windows directory c:\temp.  Will this work?
 
 Thanks,
 
 Walt
 
Just use a short script.  Install R, install the packages.  To load
them, write a short script, e.g.

#Sets working directory and loads essential libraries.
setwd([working directory here])
library(MASS, aplpack, cclust, ggplot, ...)

Call that from R and provided you have everything where you've R it
was, you're set.

JWDougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] error installing ggm package

2013-08-27 Thread jwd
Lianne,

graph can be found here:

http://bioconductor.org/packages/2.12/bioc/

You will need to read the bioconductor instructions.  If you visit the
R Project CRAN site, you can find packages there.  Each package will
have an associated description and a list of depends which are other
packages a specific R package depends upon.  The items on the list are
color coded by source.

JWDougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] data import: strange experience

2013-08-22 Thread jwd
On Wed, 21 Aug 2013 10:35:53 -0400
SH empti...@gmail.com wrote:

It looks like your problem has already been answered, however, as a
rule of thumb anytime you see a peculiarity like this you should look
for minor variations between what you expected to export and what Excel
really exported as delimited text.  Occasionally there will be a
space or other character (,'/$,- etc.) that maybe handled as
a signal or ignored by the importing program but not by Excel.  Usually
Excel works as expected, but it is a good idea to examine the text
file(s) in an editor like notepad in Windows or Kate in Linux if you
encounter an oddity. BTW, there better choices than notepad for Windows
and I would recommend one with column selecting abilities for work on
delimited data files.

jwdougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] First time r user

2013-08-18 Thread jwd
On Sun, 18 Aug 2013 02:56:56 -0500
Paul Bernal paulberna...@gmail.com wrote:

Paul,

I would suggest acquiring at least a small library of of books about
R and reading them.  I would recommend An Introduction to R and R Data
Import/Export (both available online on the R Project Site in both pdf
and HTML), Introductory Statistics with R, Venables and Ripley, and R
in a Nutshell for starters.  It is pointless to answer some of these
questions since the answers are there for the taking.  You also should
look through the logs of previous discussions in the various R user
groups also accessible through the project site, since memory
limitations have often been discussed.

JWDougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Windows 7 (Swedish): 'Rcmd INSTALL' fails (SOLVED)

2013-07-21 Thread jwd
On Sun, 21 Jul 2013 21:16:54 +1200
Rolf Turner rolf.tur...@xtra.co.nz wrote:

...
  C:\Program Files\R\R-3.0.1\library ?
 
  This is of course a very minor problem, since I never do anything 
  useful on Windows machines.
 
 Fortune candidate?
 
Seconded.

JWDougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Fwd: Problem with ODBC connection

2013-06-10 Thread jwd
On Tue, 11 Jun 2013 02:19:14 +0545
Christofer Bogaso bogaso.christo...@gmail.com wrote:

Any real answer would be contingent on a reader being provided a
reproducible example. Since you don't provide that, there's not a lot
of point to an answer. However, to tilt at a windmill, depending on the
size and complexity of your data file, it might be easier to simply
export the data from Excel as a csv file and use read.table to bring it
in to R.

JWDougherty

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.