Displaying 20 results from an estimated 900 matches similar to: "String in data frame"
2005 Jan 26
3
plot function
Hello,
how can use change the plot function to change the range of axises. I want my graph from a certain range [a, b], instead of from the min to max of of datas?
if i want draw a line instead of dots, should i use both plot and lines function.
for example:
plot(x, y);
lines(x, y);
things seem not working if i only use lines(x, y).
Thank you so much.
Cuichang Zhao
Jan 25, 2005
2008 Dec 16
2
Problem assigning "NA" as a level name in a list
I want to generate a list (called "dataList" below) where each of its
levels is named. These names are assigned to nameList, which contains
all possible permutations of size two taking letters from a larger
alphabet, e.g., "aa",...,"Fd",..,"Z1",... One of these permutations is
the character string "NA". It seems that when I try to name one
2012 Nov 03
2
reorder() in the latticeExtra library
Hello all, thanks for your time and help. Below are my commands, and it
generates a really nice plot, however I am not happy with the reorder()
function. I would like the order to be the same as they appear in the
genotype variable "genotype <- c("CJ1450 NW 4/25/12","CJ1450 BAL
4/25/12","CJ1450 NW 4/27/12","CJ1450 BAL 4/27/12","CJ1721 NW
2011 Apr 21
1
problem subsetting of a reference class
I am trying to define subset operator for a reference class and hitting some
problem i am unable to diagnose.To give an example, here is a toy class
generator that is a wrapper around a list
tmpGEN<-setRefClass("TMP", fields=list(
namelist="list"
))
tmpGEN$methods('add'=function(obj, name){
namelist[[name]]<<-obj
})
2007 Jul 31
1
[Bridge] brctl uses incorrect sysfs path
Hi,
I noticed that brctl (or more accurately, libbridge) is using the wrong path
when doing various lookups in sysfs: e.g. /sys/class/net/brXXX/stp_state
when it should use /sys/class/net/brXXX/bridge/stp_state. This doesn't
cause any problems on most systems as it falls back to the ioctl when the
sysfs attempt fails; however the ioctl method is apparently deprecated. I
believe the
2008 Apr 15
1
by inconsistently strips class - with fix
summary:
The function 'by' inconsistently strips class from the data to which
it is applied.
quick reason:
tapply strips class when simplify is set to TRUE (the default) due to
the class stripping behaviour of unlist.
quick answer:
This can be fixed by invoking tapply with simplify=FALSE, or changing
tapply to use do.call(c instead of unlist
executable example:
2011 Nov 13
2
Running totals
I have a table which looks like this:
ACC BAL
1 hal -171245.33
2 opn -50487.63
3 pga 213440.38
4 prt 0.18
5 rbs 8292.54
How do I create a column which shows the running totals of the BAL columns?
[[alternative HTML version deleted]]
2004 Apr 08
1
Why are Split and Tapply so slow with named vectors, why is a for loop faster than mapply
First, here's the problem I'm working on so you understand the context. I
have a data frame of travel activity characteristics with 70,000+ records.
These activities are identified by unique chain numbers. (Activities are
part of trip chains.) There are 17,500 chains.
I use the chain numbers as factors to split various data fields into lists
of chain characteristics with each element of
1997 Dec 08
3
R-alpha: Bug in tapply in the Windows version of September
The function tapply is not working in the Windows version of R=20
(Version 0.50 Beta (Sept 29, 1997))
In
tapply <- function (x, INDEX, FUN=3DNULL, simplify=3DTRUE, ...)=20
...
The part:
if (simplify && all(unlist(lapply(ans, length)) =3D=3D 1)) {
ans <- unlist(ans, recursive =3D FALSE)
names(ans)<-namelist[[1]]
return(ans)
}
should be replaced by
if (simplify
2000 Nov 14
14
New snapshot
I have just uploaded a new snapshot to:
http://www.mindrot.org/misc/openssh/openssh-SNAP-20001114.tar.gz
This snapshot includes Markus Friedl's new SSH2 RSA authentication work
and -R portforwarding for SSH2. Please give these a good test.
The new RSA authentications works similar to the current SSH2 DSA keys,
but requires a little modification to config files. Currently RSA
key cannot be
2017 Jun 13
2
reading data
Hi all,
I am using R to extract data on a regular basis.
However, sometimes using the same script and the same data I am
getting different observation.
The library I am using and how I am reading it is as follows.
library(stringr)
namelist <- file("Adress1.txt",encoding="ISO-8859-1")
Name <- read.fwf(namelist,
colClasses="character",
2003 Oct 28
1
ifelse with a factor variable
'ifelse' changes factors to character vectors (R-1.7.1, Linux):
> table(bal$soc.40)
tax noble semi-landless landless unknown
4035 5449 13342 9348 0
> blah <- ifelse(is.na(bal$soc.40), "unknown", bal$soc.40)
> table(blah)
blah
1 2 3 4 unknown
4035 5449
2005 Jan 10
2
doing many commands within R
Dear all,
I'm new to this list, so let me greet everyone.
My problem is that I have several thousand data files which I want to
perform a lot of R commands on, which are found in a seperate .R script.
Now, what I did was within the R prompt, I used to read in a list of the
data files.
e.g.
namelist <- readLines("list_of_names",n=-1)
for (i in 1:100) {
k <-
2006 Oct 03
2
strverscmp, scandir, alphasort and versionsort
Hello,
These are implementations of strverscmp, scandir, alphasort and
versionsort, and some test cases for them.
I know these aren't in POSIX, but they're useful, nonetheless, and
someone else might be interested in them.
Regards,
Luciano Rocha
--
lfr
0/0
-------------- next part --------------
/* ----------------------------------------------------------------------- *
*
*
2011 Jul 29
3
[PATCH 1/3] klibc: Add scandir() and alphasort() support.
Add support for scandir() and alphasort() as defined in POSIX.1-2008.
Signed-off-by: Mike Waychison <mikew at google.com>
---
usr/include/dirent.h | 7 +++++
usr/klibc/Kbuild | 2 +
usr/klibc/scandir.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 84 insertions(+), 1 deletions(-)
create mode 100644 usr/klibc/scandir.c
diff --git
2017 Jun 14
0
reading data
You need to provide reproducible data. What does the file contain? Why
are you using 'sep=' when reading fixed format. You might be able to
attach the '.txt' to your email to help with the problem. Also you did not
state what the differences that you are seeing. So help us out here.
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what
2007 May 21
2
logger anybody?
Hello,
When trying to use logger into any RSpec I get:
logger anyboundefined local variable or method `logger'' for
#<#<Class:0x278bee0>:0x253cdec>
Not sure if this is the spected behaviour (haven''t checked under the
hood) It was just annoying not having a logger instance available as in
Rails out of the tests.
--
An?bal Rojas
http://www.rubycorner.com
2002 Aug 01
2
RE: Missing files as seen by Explorer on a client (was Need help on this) **********FIXED******************
I really appreciate all your responses on this.
I might not have fixed it by looking at samba logs but i noticed there was
directory in user unix directory with wildcard * as folder name
once i removed it, samba showed up all the files and directory.
am not sure what would * as folder name caused this behaviour
may be samba was trying to interpret * as something else not sure......
or it was
2007 May 29
5
Trouble defining a stub method for a controller
Hello,
Not sure if I am doing something really wrong (let''s not say
stupid for now), but I haven''t been able to stub a controller method
like:
controller.stub!(:logged_in?).and_return(true)
Please help, this is driving me nuts ;-)
--
An?bal Rojas
http://www.rubycorner.com
http://www.hasmanydevelopers.com
2006 Feb 07
3
Dinamic controller
Is it possible to make a Rails app respond to a "dinamic" controller?
As I understand method_missing can be used inside a controller to
respond to nonexisting methods, is it possible to provide a similar
behavior at a controller level? I am not sure at whic level would this
code be inserted...
--
An?bal Rojas
http://www.lacaraoscura.com/
anibalrojas@gmail.com