Displaying 20 results from an estimated 2000 matches similar to: "assign factor levels based on list"
2002 Sep 10
3
print
Hi all,
Suppose I have a vector
Fruits <- c('Apple','Orange','Pear','Banana','Mango')
I want to print the statement
"The fruits in the basket are: Apple, Orange, Pear, Banana, Mango"
If I do:
print(paste('The fruits in the basket are:',Fruits))
The output is:
[1] "The fruits in the basket are: Apple" "The fruits in
2006 Mar 24
2
Return all rows, split then show uniques
I''m returning some rows from a tags database that look like this:
ID WORDS
1. apple banana pear
2. banana melon
3. apple peach lime
What I want to do with that data is use the .split method to divide them
into separate values in an array, then use the .uniq method to return a
unique list of the words like so:
apple, banana, pear, melon, peach, lime
So in my controller I
2009 Oct 13
2
splitting dataframe, assign to new dataframe, add new rows to new dataframe
Hi, all,
My objective is to split a dataframe named "cmbine" according to the value of "classes". After the split, I will take the first instance from each class and bin them into a new dataframe, "df1". In the 2nd iteration, I will take the 2nd available instance and bin them into another new dataframe, "df2".
>cmbine$names
apple tiger pencil chicken
2009 Jun 03
1
Still can't find missing data - How do I get NA in xtabs with factors?
The problem here is Table doesn't seem to have a way to weigh the data.
> ToyData
Data1 Data2 Data3 Weight
101 Sam Red Banana 1.1
102 Sam Green Banana 2.1
103 Sam Blue Orange 2.1
104 Fred Red Orange 2.1
105 Fred Green Guava 2.1
106 Fred Blue Guava 2.1
107 <NA> Red Pear 50.1
108 <NA> Green Pear 50.1
109 <NA> Blue
2009 May 26
3
Still can't find missing data
I'm trying to prepare some cross tabs, looking at a number of variables against a variable "connector" which has 2 values: "OD Passenger" and " Connector".
When I produce a xtabs one way I have observations under "Connector" but against a different variable "Connector" shows all 0 values.
What is wrong? I've looked into the na commands
2009 May 02
1
compiled help pages
Greetings:
This should be easy but it isn't.
I have a home-brew package that works fine, with compiled html help pages,
all 150 of them. I want to make a similar package but not from scratch
since only a half-dozen routines are changed. So I created a new directory,
copied the old package into it and changed the name to newSTUFF. I changed
the names of all help pages too, as weill
2019 Jul 18
2
ubuntu equivalent of ctrl-a on windows
Hi All: I'm using an old version of Ubuntu, 14.04, and I can't figure out a
keyboard sequence that "selects all" analogously to what ctrl-a does on
windows ?
If anyone can be bothered running below and see if they have a way to
select all four fruits at once, it's appreciated. I've spent quite a bit of
time searching the net, going on AskUbuntu etc
but no luck. Thanks.
2005 Jan 26
2
problems building R-patched
When I try to install R-patched of January 26 on my linux (fedora core 1, with openmosix kernel) box, make fails in the first recommended package with the message
tkStartGUI text html latex
tkpager text html latex
make[2]: Leaving directory `/home/setzer/newstuff/R-patched/src/library'
make[2]: Entering directory
2012 Feb 03
1
incomplete final line found on <name of my sourced function file>
Dear R-ers,
I hope there is a really simple solution to my problem.
I've written a function that I saved in an .r file. I source this file
in my code. For a while it worked fine. But then when I run the line:
source("F mylineplot.r")
I started getting a warning:
In readLines(file) : incomplete final line found on 'F mylineplot.r'
I have no idea why - I tried to check and
2006 Apr 11
2
concat results from db query
I''ve got a bunch of records coming back from a database like so
ID WORDS
1. banana apple orange
2. apple pear
3. banana orange
I want to take the records in the WORDS field and concatinate them into
one large array so I can play around with it. How do I do this?
--
Posted via http://www.ruby-forum.com/.
2002 Dec 03
3
rsync 2.5.5, "unexpected tag failures", Solaris 2.6 vs. 2.8, "--b locking-io" workaround
Hi,
I have been having a problem that seems related to previously reported
problems
but persists.
I am syncing from a 2.6 Solaris box to a 2.8 solaris box. All are running
rsync 2.5.5.
When I sync (commands simplified for example, always using rsh):
2.8box% rsync -e rsh 2.6box:/path/path/stuff/ /path/path/newstuff/
i.e., the 2.6 box is the server, I get spurious, persistent but inconsistent
2008 Nov 07
6
How to spec a (Trollop-based) binary’s internal state?
I?m trying to spec a ?binary?, and as previously discussed on this list,
I?m trying to do it ?from outside? ? i.e., by calling it with Kernel#`
and observing the (side-)effects.
Unfortunately, this doesn?t really let me spec expectations about its
internals. Let?s assume I have a -d flag and I parse it with Trollop to
set Conf.debug:
opts = Trollop::options do
opt :debug, ''Print debug
2007 May 13
1
Dropdown boxes in tcltk and R
Hello,
I'm very much a newbie in R and more so in tcltk so apologies if this
question is stupid. Basically I am trying to use the combobox example
found here:
http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/DropDown.html .
What I want to do is in that example get fruitChoice as a variable in R
in general. When I run that code, however, and the ask for fruitChoice
it says
2019 Jul 18
2
ubuntu equivalent of ctrl-a on windows
thanks david. that worked for me too and I like your detective approach.
I'll remember that the next time I need another equivalent.
On Thu, Jul 18, 2019 at 4:13 PM David Winsemius <dwinsemius at comcast.net>
wrote:
>
> On 7/18/19 1:02 PM, Mark Leeds wrote:
> > Hi All: I'm using an old version of Ubuntu, 14.04, and I can't figure
> out a
> > keyboard
2015 Feb 25
4
Easy way to strip down CentOS?
Le 25/02/2015 19:36, John R Pierce a ?crit :
> I install from the 'minimum' ISO, and get that off the bat, then just
> install the packages I need with yum
I do the same, but my question is: how to do that the other way around?
Let's say you start from the base system, then install a couple dozen
command-line utilities from cowsay to whois, then you install the "X
Window
2008 Feb 08
16
Dom0 issues: snv_79b and Tecra M9
Hi all,
I have a Toshiba Tecra M9 and have not been able to boot it dom0. This
is running SXDE 01/08, snv79b.
After booting under kmdb and setting moddebug=80000000 before booting
the Solaris kernel (with help from Dan Mick), I was able to see
mac_ether as the last thing loading, right after loading the e1000g
driver. I cannot drop into kmdb via F1-A after it hangs. I''ve also
2012 Mar 09
4
php-pear problem on yum update
Hello list
I have centos-release-5-7.el5.centos and today I noticed that there are
some updates with yum.
I try to update but something hapend with php-pear:
file /usr/share/pear/.channels/__uri.reg from install of
php-pear-1.4.9-8.el5.noarch conflicts with file from
pa ckage
php-pear-ole-0.5-2.el5.rf.noarch
file
2015 Apr 08
2
EPEL no php-pear package?
Does anyone know what package provides the pear utility for php on
CentOS?
I tried installing a php-pear module from epel and got this error:
Resolving Dependencies
--> Running transaction check
---> Package php-pear-DB.noarch 0:1.7.13-3.el6 will be installed
--> Processing Dependency: php-pear(PEAR) for package:
php-pear-DB-1.7.13-3.el6.noarch
--> Processing Dependency:
2013 Mar 20
2
Pattern match
Hello again, in the help page of grep() function, it is written that
pattern:
character string containing a regular expression (or character string
for fixed = TRUE) to be matched in the given character vector. Coerced
by as.character to a character string if possible. If a character
vector of length 2 or more is supplied, the first element is used with
a warning. Missing values are allowed
2010 Jan 14
1
lattice dotplot with missing levels in factor variable
Hi,
I am trying to create a dotplot where each panel shows levels vs.
responses; the levels are sorted by responses but levels vary from one
panel to another. However, I run into problems with controlling the
y-limits and y-labels.
In particular, suppose I have a data frame
rsp <- c(10,2,4,0,2,3)
lvl <-