Iain Gallagher wrote:
Hello list
I have been given some Excel sheets with data laid like this:
Col1Col2 A 3 2 3 B 4 5 4 C 1 4 3
I was hoping to import this into R as a csv and then get the mean and
SD for each letter in column 1.
Could someone give me some guidance
Depending on your motivation here, you may want to search for 'debugging
in R' or something to that effect to look at the various options
available. I like the debug package available on CRAN. Also see
?browser and ?trace if you want to debug a function.
[EMAIL PROTECTED] wrote:
Hi,
I kn
Davide Massidda wrote:
Dear all,
I have installed R on Linux/Ubuntu 8.04.
But you don't say how. Are you compiling R yourself or installing the
Ubuntu package from CRAN?
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/
Please give commented, minimal, self-contained, reproducible code. In
this case, not only the function definition, but a simple example
showing *how* it does not work, and what you were expecting it to do!
Angelo Scozzarella wrote:
Hi,
Why this function doesn't work?
function (x)
{
if (
Monica -
Monica Pisica wrote:
Hi,
I am using an if else statement inside a function …. If I use that
function I have no problems …. If I use the function with the if else
statement inside a second function I get the following waring:
Warning message: In if (pval == 0) p_value <- "< 2.2e-16" el
, fromLast = TRUE)
# end R code
This will of course work on the 'France' column. Use of lapply in
conjuction with this idea will lead to solving this problem for N
columns in a couple lines of R. Not messy at all!
Best Regards,
Erik Iverson
_
Daniel -
First, use order() to arrange the data.frame into an appropriate format.
Then, use duplicated() with the negation operator to get rid of the
duplicated values.
Daniel Wagner wrote:
Dear R users,
Â
I have a dataframe with lot of duplicate cases and I want to delete duplicate ones
See
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
[EMAIL PROTECTED] wrote:
Hi,
I'm using which to find the position of a value in my data table, and it is
returning the correct position and the position of another number that differs
by an ex
Ben Bolker wrote:
Erik Iverson biostat.wisc.edu> writes:
See
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
naw3 duke.edu wrote:
I'm using which to find the position of a value in my data table
[snip]
For example, w
Spencer -
Spencer wrote:
Dear R Experts,
I am trying to create several subsets that I want to use as separate
datasets. After separate subsets are created for each country, I want to
do some calculations for each. I did the following:
data <- data.frame(na.omit(read.spss("trial.sav")))
at
Erik Iverson wrote:
Spencer -
Spencer wrote:
Dear R Experts,
I am trying to create several subsets that I want to use as separate
datasets. After separate subsets are created for each country, I want
to do some calculations for each. I did the following:
data <- data.frame(na.o
Hello -
Paul Adams wrote:
Hello everyone, I have a list which I am trying to calculate a max
value.I have the list as w<-c(v[[1]][1],...v[[100]][1]). The problem
I am getting is that the function max is saying the list is an
"invalid type (list) of argument".When I show the element v[[1]][1]
it
?assign, ?get
R_Learner wrote:
Hi all,
I have this string "year" and integer 2008 (both are inputs from the
user), and I would like to make a variable called "year2008" that will store
a vector of numbers. Does anyone know how to do this?
Also, if the user later input "year" and "2008",
Chua Siang Li wrote:
Hi. May I know why the colnames is NULL when reading only 1 column from a
csv file?
You are not "reading only 1 column from a csv file", you are subsetting
one column of a data.frame. See ?Extract and the "drop" argument
specifically.
How do I get the colnam
?Devices for a start.
Aiste Aistike wrote:
Hello,
I would like to ask if anyone could help me. I want to save images I create
(e.g. histograms, boxplots, plots, etc.) to a file or files. Does anyone
know how to do this?
Thank you.
Aiste
[[alternative HTML version deleted]]
_
I think a named list is probably the easiest way to start off, something
like:
all_mat <- list(mat1 = mat1, mat2 = mat2)
all_mat$mat2
Gundala Viswanath wrote:
Hi,
Suppose I have these two matrices (could be more).
What I need to do is to store these matrices into a hash.
So that I can cal
Gundala Viswanath wrote:
Thanks so much Erik,
But how do you include that in a loop.
I tried this, doesn't seem to work. Please advice:
__BEGIN__
all_mat <- NULL
for (matno in 1:10) {
mat <- process_to_create_matrix(da[matno])
all_mat <- list(all_post, matno = mat)
}
I'm not exac
See ?View but I don't think it 'auto updates' per your last sentence.
Maybe there's a better option?
Rachel Schwartz wrote:
Hi,
I would like to view matrices I am working with in a clean, easy to read,
separate window.
A friend showed me how to do something like I want with edit(). I can vie
specific list, R-SIG-Mac, google for it.
On Fri, Aug 1, 2008 at 10:52 AM, Erik Iverson <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
See ?View but I don't think it 'auto updates' per your last
sentence. Maybe there's a better option?
0])
levels(x)
x
vs.
y <- factor(letters[1:20], levels = letters)
levels(y)
y
vs.
z <- factor(letters[1:20], levels = letters[1:19])
levels(z)
z
That might help show you what's going on?
Best,
Erik Iverson
[EMAIL PROTECTED] wrote:
Doing ?factor I get:
x a vector of data, usually taking
Just plug your values into the t-test formula, you don't need R for
this, you can use a calculator. If you want a p-value then use the pt()
function in R after getting the t statistic.
Angelo Scozzarella wrote:
Hi,
I want to calculate the T-Test from means and sd.
How can I do it?
Thanks
?assign , or consider a named vector/list.
jimineep wrote:
Hi guys,
I want to create variable on the fly: for example
for (i in 1:10) {
cat(paste("VAR",i,sep=""))
}
Will print VAR1, VAR2 etc up to VAR10. However I want to make these into
variables, and then give them a value, for example:
rcoder wrote:
Hi everyone,
I want to extract data from a data set according to dates specified in a
vector. I have created a blank matrix with row names (dates) that I want to
extract from the full data set. I have then performed a merge to try to o/p
rows corresponding to common dates to a resu
I still don't understand what you are doing. Can you make a small
example that shows what you have and what you want?
Is ?split what you are after?
Emmanuel Levy wrote:
Dear Peter and Henrik,
Thanks for your replies - this helps speed up a bit, but I thought
there would be something much fas
if(cond1 && cond2) {
...
}
rcoder wrote:
Hi everyone,
I'm trying to create an "if" conditional statement with two conditions,
whereby the statement is true when condition 1 AND condition 2 are met:
code structure:
if ?AND? (a[x,y] , a[x,y] )
I've trawled through the help files, but I canno
Hello -
Altaweel, Mark R. wrote:
Hi,
I have data stored in a list that I would like to aggregate and
perform some basic stats. However, I would like to apply conditional
statements so that not all the data are used. Basically, I want to
get a specific variable, do some basic functions (such as
I can't tell exactly what's wrong, just check out the ?str and ?levels
functions for some guidance.
Farley, Robert wrote:
I can't figure out the syntax I need to get subset to work. I'm trying
to split my dataframe into two parts. I'm sure this is a simple issue,
but I'm stumped. I either ge
Hello -
[EMAIL PROTECTED] wrote:
Hi,
I was wondering if there's a way in R to open a web browser (such as
Internet Explorer, or Firefox or whatever).
I'm doing some analyses that have associated urls, and it would be nice
to have the ability to directly open the relevant page from within R.
Benjamin Otto wrote:
Hi,
When I create an environment object with new.env() and populate it with
values then how can I save it into an .RData file properly, so it can be
loaded later on in a new session?
Saving an environment object with save() or save.image() results in an error
message when l
Of course you said when you load it again. I just now loaded it,
without error.
FYI, my sessionInfo(), which I realize is not the latest version.
sessionInfo()
R version 2.7.0 (2008-04-22)
i686-pc-linux-gnu
locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;L
See the ?paste function, instead of the ?c function.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of John Sorkin
Sent: Monday, August 10, 2009 10:36 AM
To: r-help@r-project.org
Subject: [R] Produce single line graph title composed
We cannot reproduce your example since we don't have access to probF. It seems
probF is not an object of class "table", but perhaps of class "data.frame".
Also, summary is not "cutting off the other variables", it is pooling levels of
a factor into the "Other" category. All the levels belong
General floating point arithmetic issue here:
See FAQ 7.31
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Tal Galili
Sent: Monday
I sometimes use the View() (note the capital V) function to view long/wide
data.frames.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Leon Yee
Sent: Wednesday, August 12, 2009 2:12 AM
To: Patrick Connolly
Cc: r-help@r-project.or
I think ONE answer to what you actually want to do might be
f <- function(dataf, col1 = "column1", col2 = "column2") {
dataf[[col1]] <- dataf[[col2]] # just as an example
dataf
}
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.o
Noah, depending on what function you use, it might do this automatically for
you if you give the function a formula containing a factor. Otherwise, see
?model.matrix.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Noah Silverm
This is where a small, reproducible example will definitely help us discover
your problem.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Noah Silverman
Sent: Wednesday, August 12, 2009 4:29 PM
To: Achim Zeileis
Cc: r help
Subjec
This article might help:
http://www.biostat.jhsph.edu/~rpeng/docs/R-debug-tools.pdf
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Inchallah Yarab
Sent: Thursday, August 13, 2009 9:40 AM
To: r-help@r-project.org
Subject: [R] Brows
We will only be able to help if you provide a reproducible example! I'm sure
this is a simple one-liner, but it's hard to tell from your example what it
should be. The functions table, length, tapply, and/or nrow may play a part
though.
-Original Message-
From: r-help-boun...@r-proje
Are you sure you just don't want to tell them about the :: operator? It sounds
easier than what you're proposing.
E.g.,
base::mean(c(1:10, NA))
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Pitt, Joel
Sent: Thursday, August 1
Edward,
In general, if you have an nxn matrix, you can use the "apply" function to
apply a function to each row of the matrix, and return the result.
So, as a start, you could do,
apply(your.mat, 1, median)
or
apply(your.mat, 1, median, na.rm = TRUE)
if you want to pass further arguments
You need to create a factor that indicates which group the values in 'z' belong
to. The easiest way to do that based on your situation is to use the 'cut'
function to construct the factor, and then call 'table' using the result
created by 'cut'. See ?cut and ?factor
-Original Message
I really don't think this is the issue. I think the issue is that some columns
of the data.frame, specifically V1, V2, and V4 should be checked versus R FAQ
7.31.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Don McKenzie
Sen
city),
mean))
## use dotplot with the matrix object
dotplot(h.tab, type = "o",
auto.key = list(lines = TRUE, space = "right"),
xlab = "height")
## END SAMPLE R CODE
Best,
Erik Iverson
And of course I did not test this :). Within the data.frame argument list,
please change the <- operators to = signs. Then it should work.
Erik
-Original Message-
From: Erik Iverson
Sent: Tuesday, August 25, 2009 1:17 PM
To: 'w_poet'; r-help@r-project.org
Subject:
How about ?append, but R is vectorized, so why not just
result_list <- 2*item^2 , or for more complicated tasks, the
apply/sapply/lapply/mapply family of functions?
In general, the "for" loop construct can be avoided so you don't have to think
about messy indexing. What exactly are you trying
1) Don't call your data.frame "data". I will call my "example" one "df".
2) If you want the columns NOT in names.species.bio.18, which is what you said,
then the answer is:
df[!names(df) %in% names.species.bio.18]
Best,
Erik
-Original Message-
From: r-help-boun...@r-project.org [mai
FYI, this is not homework, I have not been in school in years. I saw a similar
problem posed in a blog post on the Revolutions R blog, and although I believe
the answer, I'm having a hard time figuring out why this should be?
Thanks,
Erik Iverson
__
http://www.mit.edu/~emin/writings/coinGame.html
Best,
Erik
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Erik Iverson
Sent: Monday, August 31, 2009 2:17 PM
To: r-help@r-project.org
Subject: [R] Offtopic, HT vs. HH in coin fl
?atan2 is a possible starting point.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of clair.crossup...@googlemail.com
Sent: Tuesday, September 01, 2009 8:09 AM
To: r-help@r-project.org
Subject: [R] Function to find angle between coo
Not tested:
Instead of:
cbind(vec.names[1], vec.names[2])
cbind(get(vec.names[1]), get(vec.names[2]))
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of jonas garcia
Sent: Tuesday, September 01, 2009 12:53 PM
To: r-help@r-project.or
We will need a reproducible example! Please give us R commands that display
the behavior you're observing:
For example,
I am having trouble understanding the as.Date function. When I input 39939, I
would like to get "06.05.2009", but when I try it, I get
> as.Date(39939)
Error in as.Date.nu
% 222 2.02 2.00 2.00 2.0 2.
25%11 114 7.5 11 9.25 11.25 10.41667 10.5625
50%13 14 13 13.0 14 14.00 14.00 14.0 14.
75%31 31 31 31.0 31 32.50 31.00 31.5 31.3750
100% 47 47 47 47.0 47 47.00 47.00 47.0 47.
Best,
E
If your data.frame was called "test" below,
nrow(unique(test))
would do what you want, I believe.
Erik
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of "Biedermann, Jürgen"
Sent: Tuesday, September 08, 2009 9:24 AM
To: r-help@
ran.r-project.org/doc/manuals/R-intro.html#Object-orientation
Best Regards,
Erik Iverson
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.ht
And did you read the help file, ?paste , paying attention to the arguments and
their descriptions, specifically the "sep" argument? Presumably, you want,
paste(a, b, sep = "")
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Abhi
It is difficult to know what you're trying to do here, I think. Is this it?
You almost surely don't need a for loop to accomplish your task, and should
make use of the pre-existing vectorized functions provided to you.
a <- c(4, 5, 1, 7, 8, 12, 39)
b <- c(3, 7, 8, 4, 7, 25, 78)
d <- a - b
whi
It would be even greater if you could get us started with some commented,
minimal, self-contained, reproducible code.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of kylle345
Sent: Monday, September 14, 2009 1:35 PM
To: r-help@r-pr
Steve,
I can't speak to your exact question, but perhaps suggest a simple alternative.
What I do is simply make changes to the .R file containing my code, and use
the "source" function to read in the new definitions of my functions while I'm
tweaking them. Then, at the end of the day, I do my
See the reference to ?getAnywhere in the following post:
http://www.nabble.com/The-code-behind-the-function-td25370743.html
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Michael Pearmain
Sent: Tuesday, September 15, 2009 3:14 PM
Well, how about the nomatch argument to the match function, see ?match . The
nomatch argument is NA by default.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Peng Yu
Sent: Tuesday, September 15, 2009 4:05 PM
To: r-h...@stat.math.
See ?options, particularly the "width" setting.
> options(width=200)
Might do what you want, by default it is 80...
Best,
Erik Iverson
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Nick Matzke
Sent: Tuesday,
gards,
Erik Iverson
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Robert Hall
Sent: Wednesday, September 16, 2009 1:55 PM
To: r-help
Subject: [R] T-test to check equality, unable to interpret the results.
Hi,
I have the precision valu
Hello,
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Jon Loehrke
> Sent: Wednesday, September 16, 2009 2:23 PM
> To: r-help@r-project.org
> Subject: [R] apply function across two variables by mult factors
>
> Greetings,
>
One correction below,
---snip---
> >
> > # example data frame
> > testDF<-data.frame(
> > x=rnorm(12),
> > y=rnorm(12),
> > f1=gl(3,4),
> > f2=gl(2,2,12))
> >
>
> Try this using lapply, split, mapply? Maybe it is in a nicer output
> object for you?
>
> testFun2 <- function(x,
Dan,
Still maybe a bit ugly, but no looping...
> unique(as.data.frame(t(apply(expand.grid(0:2, 0:2, 0:2), 1, sort
V1 V2 V3
1 0 0 0
2 0 0 1
3 0 0 2
5 0 1 1
6 0 1 2
9 0 2 2
14 1 1 1
15 1 1 2
18 1 2 2
27 2 2 2
Best,
Erik
> -Original Message-
> F
nt their values accessible, simply return them.
## return just y
testfunc2 <- function(x) {
y <- 10
y
}
## return both x and y
testfunc2 <- function(x) {
y <- 10
list(x, y)
}
There are ways to make x and y global from within a function, but in general
that is not the R
urther. For example,
## return both x and y
testfunc2 <- function(x) {
y <- 10
list(x, y)
}
my.var <- testfunc2(4)
another.function(my.var)
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Erik Iver
> > estimable(fit, myEstimate)
> Estimate Std. Error t value DF Pr(>|t|)
> test 12.18198 0.6694812 18.19615 10 5.395944e-09
Where are you getting this "estimable" function from? A package? Did you
define it yourself?
__
R-help@r-project
Hello,
Do you mean exactly any 2 columns. What if the value is equal in more than 2
columns?
>
> I built a data frame "grid" (below) with 4 columns. I want to exclude
> all rows that have equal values in ANY 2 columns. Here is how I am
> doing it:
>
> index<-expand.grid(1:4,1:4,1:4,1:4)
If
could also replace "!duplicated" in my function with "unique" ...
Erik
> -Original Message-
> From: Dimitri Liakhovitski [mailto:ld7...@gmail.com]
> Sent: Monday, September 21, 2009 2:02 PM
> To: Erik Iverson
> Cc: R-Help List
> Subject: Re: [R] M
>
> You could also replace "!duplicated" in my function with "unique" ...
>
It turns out you can't, of course :).
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.o
> I did just try to do that, and it is still returning the same error when I
> try to attach the csv file..
>
> > vc1<-read.table("P:\\R\\Everything-I.csv",header=T, sep=" ", dec=".",
> na.strings=NA, strip.white=T)
> > attach(vc1)
> Error in attach(vc1) : variable names are limited to 256 bytes
> if("fit$coef[[2]]" == "NA") {.cw = 1}
See ?is.na
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-conta
Hint:
"somebody let me know how to >>>get< the function from
the name 'f'?"
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
blue sky wrote:
I don't find print.list. Could somebody let me know which method is
called when I run command print(a_list), where a_list is a list? Is
'print.default' used for printing a list?
Yes. You can always debug functions to investigate what's going on, too.
See ?debug.
__
blue sky wrote:
x=list(a=1,b=NULL)
is.null(x$b)
is.null(x$c)
Both the above two commands give me TRUE, but in the first one, b is
NULL, in the second one, c doesn't exist. Are there functions that can
help me distinguish the two different nulls?
__
R-
Well, can you algorithmically describe what you are trying to do? Your
example is not sufficient to determine it. For instance, are you trying to:
1) remove repeated elements of a vector and concatenate the first
element at the end?
2) remove repeated elements of a vector and concatenate the
Ah, the request was 'hidden' in the subject of the message, apologies!
Erik Iverson wrote:
Well, can you algorithmically describe what you are trying to do? Your
example is not sufficient to determine it. For instance, are you trying
to:
1) remove repeated elements of a
Steven Martin wrote:
All,
I installed R-2.10.1 with Readline=no. Now for some reason R does not
recognize some key strokes like the directional arrows.
I am not sure if Readline is the problem or not.
What particular OS are you using? In many cases, there is a
preconfigured package avail
Frank E Harrell Jr wrote:
Cody,
How amazing that SAS is still used to produce reports that reviewers
hate and that requires tedious low-level programming. R + LaTeX has
it all over that approach IMHO. We have used that combination very
successfully for several data and safety monitoring rep
Rhett Harrison wrote:
Hi,
I have been having problems installing the newest version on Linux
(Ubuntu 9.10) (tried on two machines).
The ./configure appears to work but I get the following error on the
'make' command.
Don't know about this, but if there's no particular reason you need to
com
Hello,
Jon Erik Ween wrote:
Hi
I would like to write a script that reads a list of variable names. These variable names
are some of the column headers in a data.frame. Then I want do a for-loop to execute
various operations on the specified variables in the data.frame, but can't figure out ho
subset(df, x %in% c(...))
chipmaney wrote:
This code works:
subset(NativeDominant.df,!ID=="37-R17")
This code does not:
Tree.df<-subset(NativeDominant.df,!ID==c("37-R17","37-R18","10-R1","37-R21","37-R24","R7A-R1","3-R1","37-R16"))
how do i get subset() to work on a range of values?
___
Cannot reproduce, what is branches? If you can narrow it down to a
"commented, minimal, self-contained, reproducible" example, you're far
more likely to get help from the list.
dkStevens wrote:
I'm observing odd behavior of the rep(...) procedure when using variables as
parameters in a loop.
Erik Iverson wrote:
Cannot reproduce, what is branches? If you can narrow it down to a
"commented, minimal, self-contained, reproducible" example, you're far
more likely to get help from the list.
My blinded guess though, is something to d
I had a comment character "#" in my header names earlier today that
threw this error.
Euphoria wrote:
Hi all! I am desperately trying to figure out the solution to this error, but
nothing as of yet is working.
As noted in an earlier post I am using GenABEL. In an attempt to read in
the phe
Chertudi wrote:
Hello helpful R folks,
First off, please forgive my English. Second, I'm new with R, I've
searched the archives about subsets, and I haven't found quite the help I
need.
I'm currently analysing a population survey whose data set has about 15000
households (the rows/observati
Dwayne Blind wrote:
Dear all,
Do you use a text editor ? What would you recommend for Windows users ? What
about Tinn-R ?
Dwayne,
Perhaps you have seen http://www.sciviews.org/_rgui/ , it has
information on several possibilities. It would be hard to pull me away
from using Emacs with ESS
Hello,
Ryan Kinzer wrote:
I am trying to understand why R is working in a particular way. I have a
data set with two variables; mark date (markd) and recap date (recapd). I
would like to know the number of days between capture dates. But if I
subtract recap date from mark date I often get the
You mention ifelse, so for completeness, I will show you a solution that
should work with that. There are other plenty of other possibilities
though, I am sure. The follow is not tested..
Assume 'my.df' is your data.frame, containing a variable "DOW".
my.df$DOW1 <- ifelse(my.df$DOW == "SAT",
Ryan Kinzer wrote:
Erik
Thanks for helping. Both of them are factors.
That's the problem, they need to be of class Date. See the R NEWS
article about Date classes in Volume 4/1.
http://cran.r-project.org/doc/Rnews/
I don't see how they could be factors though, since you shouldn't be
sjaffe wrote:
anything shorter than as.vector(as.matrix( df ) )?
df[[1]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide comm
this but immediately ran into some misconceptions I
had about how continuous variables are represented internally within the
latex function.
Is there any easier way to accomplish this breaking of pages on variable
boundaries using this set of functions? I suspect not, but thought I'd
ask. I
See FAQ 7.31
venkata kirankumar wrote:
Hi all,
I got one intresting problem with caliculating mean that is
while i am taking mean of values
*0.6, -0.8, 4, -3.8*
using
*val<-c(0.6, -0.8, 4, -3.8)*
*mean(val)*
it given result as
*2.775558e-17*
but the actual result is *"0"*
can any one sugge
Paul Miller wrote:
Hello Everyone,
I have just started learning R and am in the process of figuring out
what it can and can't do. I must say I am very impressed with R so
far and am amazed that something this good can actually be free.
Recently, I finished reading R for SAS and SPSS Users and
alex46015 wrote:
I think I figure it out.
ifelse(data1$x==1,rnorm(12,2,1),ifelse(data1$x==2,rnorm(12,-2,1),rnorm(12,110,1)))
Where is the number 12 coming from? Is that the length of data1$x?
Here is a sample using the fact that rnorm can accept vectors of means
and sds. My x is rand
Worik R wrote:
Related: I found the problem eventually. It was a parameter that was too
large and the function called "stop".
Looking at the documentation I see I can supply my own error handler. Cool.
Are there already written error handlers that dump a stack trace?
Is ?traceback what you
Martin Batholdy wrote:
Hi,
I would like to compare a column of data with a vector.
I have this data.frame for example;
x <- data.frame(A = c(1:5), B = c(1,1,2,2,2))
Now I have a search vector:
search <- c(1,3,5)
when I now try to get all the data-rows which have a 1, a 3, or a 5 in column
side individually for
each component:
names(list.example) <- c("df.example$a > 7", "df.example$b < 4")
Any ideas?
Best Regards,
Erik Iverson
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listi
1 - 100 of 760 matches
Mail list logo