Displaying 10 results from an estimated 10 matches for "stausland".
2012 Jul 22
5
Reorder in decreasing order
reorder() is probably the best way to order the levels in a vector
without manually specifying the order. But reorder() orders by default
in an increasing order: "The levels are ordered such that the values
returned by ?FUN? are in increasing order."
Is there a way to do what reorder() does, but order the levels
according to a _decreasing_ order of the values?
Sverre
2011 Jul 17
3
gsub() with unicode and escape character
Dear helpers,
I'm trying to replace a character with a unicode code inside a data
frame using gsub(), but unsuccessfully.
> data.frame(animals=c("dog","wolf","cat"))->my.data
> gsub("o","\u0254",my.data$animals)->my.data$animals
> my.data$animals
[1] "d??g" "w??lf" "cat"
It's not that a data
2011 Jul 11
2
Extract only the values from a row
Dear helpers,
how can I extract only the values from a row in a data frame? Using
[X,] doesn't do the trick:
> data.frame(letters[1:10],letters[11:20])->my.data
> my.data[1,]
letters.1.10. letters.11.20.
1 a k
I would like to be able to extract only the values "a" and "k" without
getting the row names and column names with them.
2011 Aug 02
7
Extract names from vector according to their values
Dear helpers,
I can create a vector with the priority of the packages that came with
R, like this:
> installed.packages()[,"Priority"]->my.vector
> my.vector
base boot class cluster codetools
"base" "recommended" "recommended" "recommended" "recommended"
compiler datasets
2011 Jul 14
1
Export Unicode characters from R
Dear helpers,
I am not able to export Unicode characters from R. Below is an example
where the Unicode character is correctly rendered as long as I am stay
within R. When I export it, the character appears only with its basic
code, and the same happens when I import it back into R . I'm using R
2.13.1 in Windows XP.
> funny.g <- "\u1E21"
> funny.g
[1] "?"
>
2013 Nov 09
1
Support writing UTF-8 output in Windows
As recently discussed on Stack Overflow, R for Mac OS and Ubuntu (so
probably all Unix systems) can correctly write files with UTF-8
encoding, but R for Windows cannot:
http://stackoverflow.com/questions/19877676/write-utf-8-files-from-r
I strongly suggest that R for Windows should support this feature in
upcoming versions.
Sverre
2011 Aug 15
1
update() ignores object
Hi all,
I'm extracting the name of the term in a regression model that
dropterm specifies as the least significant one, and I'm assigning
this name to an object. However, when I use update(), it ignores this
object. Is there a way I can make it not ignore it? A reproducible
example is below:
> lm(x1~1+y1*y2+y3+y4,data=anscombe)->my.lm
>
2011 Aug 03
1
Extract rows from a matrix according to value in column
Dear helpers,
I'm trying to extract certain rows from a matrix according to the
values the rows have in a certain column. I've been googling for a
while without result.
Here's a reproducible example of a matrix (and the one I was playing
with initially):
> myrepo<-getOption("repos")
>
2011 Aug 09
1
embedFonts() does not embed fonts?
Dear helpers,
I'm trying out the embedFonts() to embed fonts into my pdf files.
However, when I inspect the new pdf with a program designed to look
for embedded fonts, I see that the fonts have in fact not been
embedded. Below are my calls.
R version 2.13.1 (2011-07-08)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i386-pc-mingw32/i386 (32-bit)
2011 Mar 30
0
Plot an ols() call from Design
Dear users,
I am attempting to plot an ols() call from the Design package, by
following the procedure explained by Harald Baayen in his 2008 book
'Analyzing linguistic data. A practical introduction to statistics
using R', page 175-181.
I've attached my data to this e-mail (I hope it's small enough that that's ok).
First I paste all the commands I ran, followed by the