similar to: Error with write.table

Displaying 20 results from an estimated 50000 matches similar to: "Error with write.table"

2006 Mar 07
7
reading in only one column from text file
How do I manipulate the read.table function to read in only the 2nd column??? [[alternative HTML version deleted]]
2005 Nov 30
2
OT: Statistics question
I apologise for asking this question here but I am hoping that someone can either give me direct guidance and/or point me to a better group for this type of disucssion. I have what I feel should be a fairly simple problem but which my limited stats knowledge can't answer. I have two overlapping distributions (both normal) and I want to answer the question how do I calculate the cut-off value
2005 Nov 14
1
effect sizes for Wilcoxon tests
Hello, I use t.test for normal distributed and wilcox.test for non-normal distributed samples. It is easy to write a function for t.test that calculates the effect size, because all parts of the formula are available from the t.test result: r = sqrt(t*t / (t*t + df)) However, for Wilcoxon tests, the formula for effect sizes is: r = Z / sqrt(N) I wonder how I can calculate the Z-score in R for
2006 Feb 02
2
re-coding variables
Dear All, I wonder how to re-code a categorical variable without using the ifelse loops. For example: Let X be a categorical variable with 6 levels, levels(X) = c(1,2,3,4,5,6) How to create a new categorical variable Y with levels, 10,11,12, say , such that: Y = 10 if X =1 or X=2 Y = 11 if X =3 or 4 Y =11 if X = 5 or 6 many thanks, Bernard
2006 Jan 20
3
abline() or predict.lm() when log="x"
Hello, I'm trying to plot a fitted lm() line on a plot when the one explanatory variable is log transformed and log="x". I get different lines using abline and predict.lm(). #Example x <- 1:100 y <- rnorm(100) plot(y ~ x, log="x") abline(lm(y ~ log(x))) lines(x, predict(lm(y ~ log(x))), lwd=2) I'm sure I'm missing something but could someone tell me which
2007 Dec 30
3
Date formats
Is the following expected behaviour for a date used in an ifelse function? > date <- Sys.Date() > date [1] "2007-12-30" > ifelse(TRUE, date-1, date) [1] 13876 > ifelse(FALSE, date-1, date) [1] 13877 > ifelse(TRUE, as.character(date-1), date) [1] "2007-12-29" > if (TRUE) {date} [1] "2007-12-30" It would seem more natural to me if a date produced
2006 Jun 04
1
text bubble (rectangle)?
Dear R wizards: sorry to bug everyone twice in one day. I would like to annotate my graph by putting text strings into rectangle boxes with a little cartoon-like bubble with a lid pointing to a specific location. I can draw some sort of bubble-with-lid using the R primitives. (has anyone done something like this already?) the problem where I am stuck is that the width of the rectangle must
2005 Dec 15
2
question on write.table
Hi, I have a question on write.table: I have a data.frame called t7 as below: > dim(t7) [1] 14015184 6 > t7[1:5,] uci uce par line graphical.forms stems 1 0 0 0 0 active activ 2 0 0 0 0 policy polici 3 0 0 0 0 wc PC 4 0 0 0 0 eff elf 5 0 0 0 0 icn ICC I want to write the
2009 Nov 27
2
using reshape to do ANOVA mixed models
Hi, I just started with R and I found that there are many options to rearrange the data to do mixed models. I want to use the reshape function. I have 2 between subject variables and one within. I was able to change the data structure but still - the result of the aov functions are calculating everything as a within subject. the table looks like this: SerialNo breed treatment distance_1
2009 Apr 09
3
type.convert (PR#13646)
Full_Name: Stefan Raberger Version: 2.8.1 OS: Windows XP Submission from: (NULL) (213.185.163.242) Hi there, I recently noticed some strange behaviour of the command "type.convert", depending on the startup mode used. But there also seems to be different behaviour on different PCs (all running the same OS and the same version of R). On PC1: When I start R in SDI mode (RGui --no-save
2008 May 07
2
Solution of function
Hi, I want to find solution of function : f(x,y) = x'Cx - a under constraints : 0 < x,y < p 0 < x-y< q where a, p,q are given constants and x = (x, y) and C is a 2X2 matrix (given) Can anyone suggest me any R function to do that? --------------------------------- [[elided Yahoo spam]] [[alternative HTML version deleted]]
2008 May 05
4
Column renaming
Dear all, Is there a less cumbersome way to rename a column by name (as opposed to index) than -- names( X)[ names[ X] == "bob"]<-"sue" ? A semi-related question: how does one get the index of a column by name, something along the lines of col.index( X, "sue") ? Chip Barnaby --------------------------------------------------------- Chip Barnaby
2006 May 29
6
Numerical error in R (win32) (PR#8909)
Hi I had observed the following problem in R (also C, Matlab, and Python). sprintf('%1.2g\n', 3.15) give 3.1 instead of 3.2 whereas an input of 3.75 gives 3.8. Java's System.out.printf is ok though. > round(3.75,1) [1] 3.8 > round(3.15,1) [1] 3.1 Similar outcome with sprintf in R. However, the right answer should be 3.2 Regards Teckpor [[alternative HTML version
2006 Mar 02
5
Deparsing '...'
Hi, The following function works, but is there a neater way to write it? f = function(x,...) { # return a character vector of the arguments passed in after 'x' gsub(" ","",unlist(strsplit(deparse(substitute(list(...))),"[(,)]")))[-1] } > f(x,a,b,c*d) [1] "a" "b" "c*d" > Thanks. [[alternative HTML
2008 Mar 26
3
Misc/List Search Path from keyboard (PR#11036)
Full_Name: Richard Reed Version: 2.6.2 OS: MS Windows XP Pro Submission from: (NULL) (76.121.170.35) Pressing Alt-M+s doesn't search path. It just generates another ">". It does this in "vanilla" too. However, Alt-M+click "list search path" does work. Note that when I press Alt-M (and the "Misc" menu drops down) the second "s" in
2006 Sep 21
3
newie help needed
hi, I am a system admin who has just set up R-2.3.1 in suse 9.1 (opteron) for a previous windows user. Please forgive any obvious stupid questions :) We are struggling with a number of things. 1. is there a gui interface ? How do we use it ? R --gui just gets us to the command line. 2. how do we do unix commands like cd ? 3. can we define default directories - eg for data files ? 4.
2007 Feb 06
2
when i run ./configure,i meet a problem
i get a message: configure: WARNING: you cannot build info or html versions of the R manuals what should i do ? [[alternative HTML version deleted]]
2008 Dec 22
2
R 2.8.1
R 2.8.1 is packaged up and queued up for testing. Please test this out: Fedora 9: https://admin.fedoraproject.org/updates/rpy-1.0.3-6.fc9,R-2.8.1-1.fc9 Fedora 10: https://admin.fedoraproject.org/updates/rpy-1.0.3-6.fc10,R-2.8.1-1.fc10 Once you've tested it, please, please, go to the update URL above and click "Add A Comment". If it works for you, click "Works for me" and
2007 Oct 17
2
wilcox.test test statistic
Dear all, When we perform a Wilcoxon rank sum test (on two samples with different sizes) we get a test statistic. My question is, as the value of test statistic increases the difference between the distributions of the two samples also increase, right? Thanks in advance, João Fadista [[alternative HTML version deleted]]
2005 Jul 14
2
Calculate of data frame
Hello, I have a dataframe which I read from a file: df <- readtable(myFile); The dataframe has 4 columns: "model", "count", "value" and "date" where "model" and "date" are made of charactors and "count" and "value" are numbers. An example is like: model count value date A 4 20.8