Displaying 20 results from an estimated 20000 matches similar to: "Thank you"
2008 Apr 30
2
ordering a factor in boxplot output
I'm sure I'm missing something obvious in the documentation...
I'm generating a boxplot
boxplot(CleanValue~ApptCategory*ReportingCode,data=newfile)
where ApptCategory is a factor with possible values ("New","Established")
Problem is, the output orders those factors alphabetically, and I'd really
rather see New come first. I'm apparently confused by the
2008 Dec 15
2
Baffled: triggering error message with an sd result in odfWeave?
I hope someone can point out my stupid error, because I'm baffled.
I am calculating a bunch of variable values and then placing them in a
document using odfWeave tags.
This is working very nicely for every spot except one.
One of the values I calculate is traindev:
traindev <- if (trainlength>0) round(sd(trainscores, na.rm=T),1) else ""
when I try to insert this traindev
2008 Dec 09
1
chron - when seconds data not included
I have date and time data which looks like this:
[,1] [,2]
[1,] "7/1/08" "9:19"
[2,] "7/1/08" "9:58"
[3,] "7/7/08" "15:47"
[4,] "7/8/08" "10:03"
[5,] "7/8/08" "10:32"
[6,] "7/8/08" "15:22"
[7,] "7/8/08" "15:27"
[8,] "7/8/08"
2008 Dec 31
1
Suggestions for inputting a date via a dialog box?
I've written a program which will be run by someone who isn't an R programmer
and isn't all that computer-savvy in general. The user starts the program
and is prompted to input various information such as location of data files.
I've used the Sciviews svDialogs package for this with good success.
(although we're still ironing out tck/tk issues on some of his machines -
with
2008 Jun 12
3
Adding new columns to (output) data - e.g., read 5 cols write 8
Hello, I have the following task I'd like to accomplish:
A file contains 5 columns of data (several hundred rows), let's call
them a, b, c, d and e (ie these are their column headers)
I also have a set of definitions, e.g.,
f = a + b
g = a * 3
h = c + d
etc.
I would like to write out a new .rda file that contains columns
a b c d e f g h etc.
I.e. , the original data plus new columns
2008 Apr 24
1
re shaping "long-form" longitudinal data from sql query
hi, I'm a total noob who is having to ramp up to full speed very quickly due
to an unfortunate abrupt staffing change at my job :)
I have longitudinal data that looks like this:
PID OBSDATE DaysAgo CleanValue
NAME
1 1410164934000610 8/17/2004 13:03:38 1345 6.2 HGBA1C
2 1410164934000610 11/16/2004 10:39:51 1254 7.1
2009 Aug 28
6
Google's R Style Guide
Perhaps most of you have already seen this?
http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html
Comments/Critiques?
Thanks,
Esmail
ps: Reminds me of PEP 8 for Python
http://www.python.org/dev/peps/pep-0008/
Maybe not that surprising since Python is also one of the main languages
used by Google.
2009 Apr 19
3
flip certain bits in vector
I have a string of binary values, and I would like to flip certain
bits in a set of positions.
Let's say the
vector p contains position [1, 3, 5, 7]
vector b contains bits [1, 0, 1, 0, 1, 0, 1, 0, 1, 0]
result r should be [0, 1, 0, 0, 0, 0, 0, 0, 1, 0]
in pseudo code this would be something like
---
r = c()
for (i in 1:10)
if (i in p)
r = c(r, flip[i])
r
----
2008 May 09
2
which.max2()
Hello,
which.max() only returns one index value, the one for the
maximum value. If I want the two index values for the two
largest values, is this a decent solution, or is there a
nicer/better R'ish way?
max2 <-function(v)
{
m=which.max(v)
v[m] = -v[m]
m2=which.max(v)
result=c(m, m2)
result
}
Seems to work ok.
Thanks,
Esmail
2009 Apr 26
4
comparing matrices
I'm trying to compare two matrices made up of bits.
doing a simple comparison of
matA == matB
yields this sort of output.
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] FALSE TRUE FALSE TRUE TRUE FALSE
[2,] TRUE TRUE TRUE TRUE TRUE TRUE
[3,] FALSE TRUE FALSE FALSE FALSE TRUE
[4,] FALSE TRUE TRUE FALSE FALSE FALSE
[5,] TRUE TRUE TRUE TRUE FALSE FALSE
[6,] TRUE TRUE
2010 Jul 23
5
UseR! 2010 - my impressions
Dear UseRs!,
Everything about UseR! 2010 was terrific! I really mean "everything" - the tutorials, invited talks, kaleidoscope sessions, focus sessions, breakfast, snacks, lunch, conference dinner, shuttle services, and the participants. The organization was fabulous. NIST were gracious hosts, and provided top notch facilities. The rousing speech by Antonio Possolo, who is the chief
2008 May 07
1
Automatically generating new column names (and columns)
Once again I need to tap into the collective knowledge here.
Let's say I have the following columns and data below
Y X1 X2 X3 X4
I would like to generate additional new columns and column names
(ie the data would be squared - and I'd like the column names to
reflect this) like:
Y X1 X2 X3 X4 X1^2 X2^2 X3^2 X4^2
I believe I can compute the values correctly with the code below, but
I
2010 Feb 24
2
sprintf + integer(0) problem
Hello all,
I am stuck with R v2.8.0 under Linux for the time being and I am
running into a small problem that doesn't exist under 2.9.x and 2.10.x
with sprintf.
If I have the following code segment to help me determine the column
number for a specific column header/label:
nn = names(Dataset)
s = "Group"
c = which(nn==s)
cat(sprintf('found %s in col %d\n', s, c))
2001 Jan 14
2
Help
Dear sir,
I am using R in windows. I want to extend R Memory
size.
I use the following command, but unfortunately it
doesn't work.
-- vsize=15M --nsize=1000K
Your help is appreciated.
Thanks,
Esmail Amiri.
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
2011 Apr 12
3
[Thank you!] IMHO only RHEL is better than CentOS...
...based on my experience, for use in all non-certified enterprise
operations (large and small) on general-purpose computers.
RHEL is, of course, the better alternative when you require the upstream
vendor's certified platform, certified and tested integrated solutions,
industry-leading support, or customized solutions. Their offerings are a
bargain when you consider the benefits they provide
2009 May 18
1
error in importing text files
Hello All:
I am very new to R and am trying to import some (107) text files into R while simultaneously manipulating the data into a structure that I can use. Below is a description of what I am trying to ultimately accomplish. However, I find that I am unable to even read one file into R using the read.table function. I get the following error:
> test<-read.table("test4.txt")
2008 May 06
2
building a formula string bit by bit ..
Hello,
Still a newbie with R, though I have learned a lot from reading
this list. I'm hoping someone can help with this question:
I have two vectors, one for variables, and one for bits.
I want to build a string (really a formula) based on the values in my
vector of 1s and 0s in bits. If I have a one, I want to include the
corresponding entry in the vars vector, otherwise ignore it. Of
2009 Feb 18
2
how to randomly eliminate half the entries in a vector?
(sorry if this is a duplicate-problems with posting at my end)
----
Hello all,
I need some help with a nice R-idiomatic and efficient solution to a
small problem.
Essentially, I am trying to eliminate randomly half of the entries in
a vector that contains index values into some other vectors.
More details:
I am working with two strings/vectors of 0s and 1s. These will contain
about 200
2010 Feb 15
1
argh .. if/else .. why?
Hello, would someone please help explain the following inconsistency
in the if/else statement to me?
The format of the if/else #3 below is ok, but if/else #1 is not? (I get
an "unexpected else" type error.) In order for it to work I have to use
if/else #2
Thanks .. maybe there is some reason for this, but this looks very
inconsistent to me.
R version 2.10.1 (2009-12-14)
Ubuntu 9.04
2008 Jun 11
3
searching for specific row in matrix
Hi,
I have matrix of bits and a target vector. Is there an
efficient way to search the rows of the matrix for the target?
I am interested in the first row index where target is found.
Example:
> source("lookup.R")
[,1] [,2] [,3] [,4] [,5]
[1,] 1 0 1 1 0
[2,] 1 1 0 1 0
[3,] 0 0 1 0 0
[4,] 1 0 0 1 1
[5,]