Displaying 20 results from an estimated 7000 matches similar to: "Question on levels function and extracting the associated level number"
2012 Mar 30
4
Trying to understand factors
I'm trying to figure out about factors, however the on-line documentation is
rather sparse. I guess, factors are intended for grouping arrays members into
categories, which R names "Levels". And so we have:
* state <- c("tas", "sa", "qld", "nsw", "nsw", "nt", "wa", "wa",
2007 Nov 16
7
sorting factor levels by data frequency of levels
using an example from r online help
> state <- c("tas", "sa", "qld", "nsw", "nsw", "nt", "wa", "wa",
"qld", "vic", "nsw", "vic", "qld", "qld", "sa", "tas",
"sa", "nt", "wa", "vic",
2005 Jul 26
1
beginner finds a bug - crash induced. (PR#8035)
Full_Name: Stephen Holland M.D.
Version: 2.1.1
OS: Mac OS X
Submission from: (NULL) (67.184.33.112)
I did a bunch of stuff, then did in sequence:
> state <- c("tas", "sa", "qld", "nsw", "nsw", "nt", "wa", "wa",
+ "qld", "vic", "nsw", "vic",
2002 Jan 31
1
obvious answer
I apologise for this question, as I'm sure the answer has got to be
obvious, but I am trying to follow the John Maindonald tutorial and have
stumbled at the first page.
I have sussed out that I need to use the source command rather than the
read.table command as illustrated in the tutorial, but the data isn't
reading in properly with additional names at the beginning and end of the
2015 Jul 27
2
Error sql en función
Hola:
No consigo que la función sqldf () funcione dentro de una función. Alguien puede echarme una mano. En resumen, el problema es que cuando lo ejecuto fuera de una función no tengo ningún problema:
==========================
> # install.packages("sqldf")
> library(MASS)
> library (sqldf)
> data(Aids2, package="MASS")
> options(digits=3)
> table
2002 Feb 01
0
No subject
> myotis at cix.compulink.co.uk (Graham Smith) writes:
>
>> I apologise for this question, as I'm sure the answer has got to be
>> obvious, but I am trying to follow the John Maindonald tutorial and
have
>> stumbled at the first page.
>
>Link? (I suppose that I could find it, but it is you problem...)
http://wwwmaths.anu.edu.au/~johnm/r/dsets/
>> I have
2015 Jul 27
2
Error sql en función
Hola Carlos:
Gracias por responder!
Ayer caí en esta página al buscar el problema con google, pero no conseguir entender y implementar lo que sugiere. Sin entender nada, lo que hice fue:
========================
> library(MASS)
> library (sqldf) # Per SQL
> data(Aids2, package="MASS")
> SQL_PROVA = function (XDADES, XWHE)
+ {
+ XDADES_SQL = sqldf ("select * from
2001 Feb 27
6
How to read a text table? A bit of trouble with Using R - An Introduction
> Ok...So I actually *typed* the table with WordPad, using the Tab button
>in order to separate the columns, and saved it in rich text format. As you
>might have guessed, it didn´t work. I got a:
> Error in count.fields(file, sep, quote, skip, blank.lines.skip) :
> string terminated by newline or EOF
RTF is not what is meant by text. What I am writing is text.
Your
2007 Apr 30
1
mirror's choice when installing a package for R-2.5.0 (PR#9643)
Hello,
Just a quick message to say that,
------------------------------------------------------------------------
-------
when choosing (with or without the tcltk window) "Bern 1 (swiss)" as
CRAN mirror to install
a package (function install.packages) for R-2.5.0, the list of
available packages
for osx seems not complete:
AMORE, AdaptFit, AlgDesign, AnalyzeFMRI, SemiPar,
2005 Aug 12
1
Help converting a function from S-Plus to R: family$weight
Hi all
I am converting an S-Plus function into R. The S-Plus code
uses some of the glm families, and family objects.
The family objects in S-Plus and R have many different
features, for example:
In R:
> names(Gamma())
[1] "family" "link" "linkfun" "linkinv" "variance"
[6] "dev.resids" "aic"
2006 Apr 19
2
How to do case-sensitive searches
Forgive me if this topic has already been discussed on the list. I
googled but couldn''t find much. I''d like to search through text for
US state abbreviations that are written in capitals. What is the best
way to do this? I read somewhere that tokenized fields are stored in
the index in lowercase, so I am concerned that I will lose precision.
What is the best way to store a
2007 Oct 31
2
R GUI for Linux
I have downloaded and tried to install JGR - Java GUI for R - Version 1.5.
I followed all the instructions (at least in my best resolution) and
installed Java latest version.
R installation complete fine.
Has anyone succeded in installing JGR on SuSE 10.3 ?
In the following I hade detailed the failed installation,
As root /i did the following:
linux-Mimin:/usr/local/bin # ./R
R version 2.6.0
2007 Aug 30
5
Single plot multiple levels in x?
Plotting with 2 x axis?
One axis inside another, for example salary within state,
1-50 | 50 ? 100 | 100+ | 1- 50 | 50 -100 | 100+ | ? repeated bins for salary
AL ! AR ?? more states
The values are all stored with a single data frame. I have tried different things with the axis function and done many
2007 Jan 07
1
substitute creates an object whichprints incorrectly (PR#9427)
> I think we should get rid of source attributes completely,
> since they are no longer needed, but your comment still
> applies to source references. We should strip them when code
> gets modified.
>
> Duncan Murdoch
I would be very concerned about losing source attributes-- it would
break a lot of my code :(! It's very useful to have a single portable R
object that
2010 Feb 13
1
Using getSYMBOL, annotate package on a list with empty elements.
Hi,
I have been trying to find a solution to this issue, but have not been able
to so !
I am trying to use sapply on the function getSYMBOL,
an extract from the list is:
> test.goP[13:14]
$`GO:0000050`
IEA IEA IEA IEA TAS TAS TAS
IEA
"5270753" "5720725" "1690128" "4850681" "110433" "2640544"
2005 Oct 06
2
R/S-Plus equivalent to Genstat "predict": predictions over "averages" of covariates
Hi all
I'm doing some things with a colleague comparing different
sorts of models. My colleague has fitted a number of glms in
Genstat (which I have never used), while the glm I have
been using is only available for R.
He has a spreadsheet of fitted means from each of his models
obtained from using the Genstat "predict" function. For
example, suppose we fit the model of the type
2007 Jul 12
0
[LLVMdev] Atomic Operation and Synchronization Proposal v2
Here are some comments, quotes are from the draft.
> an operation based constraint cannot guard other operations
I think constraints associated with a particular instruction usually apply
to this instruction and previous/subsequent instructions, so this wouldn't
be true. This is the case in the atomic_ops model, and also on ia64 I
think.
> The single instruction constraints can,
2008 Dec 21
1
Form issues : partials + AJAX vs simple JS / separate views + form_fors vs one view and fields_fors
Hi all!
I am coding an application that keeps track of request to create
college courses. An identified user (logically a faculty member)
completes a form indicating the name of the course, the professor in
charge, the course''s code, the date and place, the possible
coprofessors and TAs and the type of website he or she wants to use as
a teaching help (WebCT, Sakai, etc.).
I have two
2010 Sep 15
1
Difficulty creating Julian day in data frame
Hi,
I'm attempting to add a "Julian Day" column to a data frame.
Here is my code and the resulting data frame:
vic.data <- read.table("C:/VIC/data/vic.data.csv", header=F)
names(vic.data) <- c("year", "month", "day", "precip", "evap",
"runoff", "baseflow", "Tsup",
2005 Mar 06
1
wine wont' run
Any guess's as to whats going on here?
A new from source compile/install
vic@zeus:/usr/local/bin$ wine
wine: creating configuration directory '/home/vic/.wine'...
Unknown option '-w'
usage: wineserver [options]
options:
-d<n> set debug level to <n>
-p make server persistent
-h display this help message
-s server will use shared memory