Displaying 20 results from an estimated 1500 matches similar to: "Reading one column .csv file"
2013 Apr 17
3
t-statistic for independent samples
Hi,
Typical things you read when new to stats are cautions about using a
t-statistic when comparing independent samples. You are steered toward a
pooled test or welch's approximation of the degrees of freedom in order to
make the distribution a t-distribution. However, most texts give no
information why you have to do this.
So I thought I try a little experiment which is outlined here.
2012 Nov 29
2
Analysis of Variance
Hi, I am encountering a difficulty I don't understand. Be patient, I'm very
new to analysis of variance.
If I load this data:
example12_7=read.table("http://msemac.redwoods.edu/~darnold/math15/data/chapter12/example12_7.dat",header=TRUE)
The run the oneway.test:
oneway.test(time~drug,data=example12_7,var.equal=TRUE)
I get these results:
data: time and drug
F = 4.1881, num
2011 Feb 08
2
Frequency plot --- stacked symbols
Hi,
We were wondering how we could make a stacked frequency diagram such as this one:
http://msemac.redwoods.edu/~darnold/math15/liz.pdf
We don't necessarily need the shaded "balls", other characters would be fine, such as stacks of x's.
David
2012 Jul 13
4
Side by side strip charts
Hi,
I'm looking for some ideas on how to reproduce the attached image in R.
There are three samples, each of size n = 10. The first is drawn from a
normal distribution with mean 60 and standard deviation 3. The second is
drawn from a normal distribution with mean 65 and standard deviation 3. The
third is drawn from a normal distribution with mean 70 and standard
deviation 3.
2012 Aug 04
3
Head or Tails game
Hi,
Reading about a "Heads and Tails" game in
http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/amsbook.mac.pdf
Introduction to Probability (Example 1.4, pp. 5-8).
You toss a coin 40 times. If heads, Peter wins $1, tails, he loses $1. I
think I can do that ok with:
winnings <- sum(sample(c(-1,1), 40, replace=TRUE))
But I have to do it 10,000 times
2012 Jul 14
2
Arrange two columns into a five variable dataframe
Hi,
I hope that folks can give me some simple approaches to taking the data set
below, which is accumulated in two columns called "long" and "group", then
arrange the data is the "long" column into a data frame containing five
variables: "Group 1", "Group 2", "Group 3", "Group 4", and "Group 5". I am
hoping for a few
2012 Aug 26
3
Aligning barplot
All, Consider:
BagA <- c(-1000,10,10,10,10,10,10,
10,20,20,20,20,20,20,30,
30,40,40,50,60)
BagB <- c(10,20,30,30,40,40,50,50,
50,50,50,50,60,60,60,60,
60,60,60,1000)
layout(c(2,1))
barplot(table(BagB))
barplot(table(BagA))
At this point, I'd like to arrange the plots so that the 10-bars are
aligned, the 20-bars are aligned, etc. So, I started
2013 Jan 05
3
Rounding
Hi,
Can someone explain this:
> options(digits=20)
> 1/3
[1] 0.33333333333333331483
Why the 1483 at the end?
Thanks,
David.
david-arnolds-macbook-pro-2:~ darnold$ R --version
R version 2.15.2 (2012-10-26) -- "Trick or Treat"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
--
View this
2008 Jun 14
1
plotting regression line
Hello,
I'm trying to plot an exponential regression line through my data
(scatterplot with trend line), but can't find a way to do that. it is to be
the best fit possible.
--
View this message in context: http://www.nabble.com/plotting-regression-line-tp17837683p17837683.html
Sent from the R help mailing list archive at Nabble.com.
2012 Aug 26
3
Two selections from Bag A
All, I am looking at an example in Aliaga's Interactive Statistics. Bag A has
the following vouchers.
BagA <- c(-1000,10,10,10,10,10,10,
10,20,20,20,20,20,20,30,
30,40,40,50,60)
Bag B has the following vouchers.
BagB <- c(10,20,30,30,40,40,50,50,
50,50,50,50,60,60,60,60,
60,60,60,1000)
Two values are selected (from BagA or BagB) without
2012 Aug 03
2
Printing a summary
All,
Is this typical of how people will print a summary of results?
CoinTosses <- function(n) {
x <- sample(c(0,1), n, replace=TRUE)
y <- x
y[y==0] <- "T"
y[y==1] <- "H"
numHeads <- sum(x)
numTails <- n-sum(x)
p <- numHeads/n
cat(cat(y,sep=""),"\n")
cat("Number of heads: ", numHeads, "\n")
2012 Jul 21
4
rhsape2 bug?
All,
I believe I am running the latest version of rshape2 (1.2.1). But this code:
library(reshape2)
tmp <- melt(smiths,
id.vars=1:2,
measure.vars=c("age","weight","height"),
variable.name="myvars",
value.name="myvals"
)
names(tmp)
Produces this output:
> names(tmp)
[1] "subject" "time"
2005 Feb 16
7
Easy cut & paste from Excel to R?
Hi!
Is it possible to easily cut & paste data from an
Excel spreadsheet to
an R edit( ) grid or to variable?
It seems that R cannot handle the cell delimiters
Excel hands over.
Regards,
Werner
2024 Feb 17
1
certain pipe() use cases not working in r-devel
I've now tested with:
> R.version.string
[1] "R Under development (unstable) (2024-02-16 r85931)"
and all of the previously mentioned examples now work as expected on macOS.
Thanks for the quick fix,
Jenny
On Thu, Feb 15, 2024 at 8:02?AM Tomas Kalibera <tomas.kalibera at gmail.com>
wrote:
>
> On 2/14/24 23:43, Jennifer Bryan wrote:
> > Hello,
> >
>
2012 Jul 18
4
Entering Data Files
Hi,
Entering data from a given file is the hardest part of learning R for me.
For example, I have this datafile from Moore's text:
Live Age Count
Parents Age19 324
Another Age19 37
OwnPlace Age19 116
Group Age19 58
Other Age19 5
Parents Age20 378
Another Age20 47
OwnPlace Age20 279
Group Age20 60
Other Age20 2
Parents Age21 337
Another Age21 40
OwnPlace Age21 372
Group Age21 49
Other Age21 3
2012 Jul 12
4
Adjusting format of boxplot
Hi,
I managed to use the attached data set and figure out the following:
flies <- read.table("example12_1.dat",header=TRUE,sep="\t")
boxplot(long ~ group,
data = flies,
horizontal = TRUE,
col = "red")
I'm very new to R and would like some help with the following:
1. Change the order on the y-axis from 1, 2, 3, 4, 5 to 5, 4, 3, 2, 1.
2024 Feb 14
2
certain pipe() use cases not working in r-devel
Hello,
I've noticed a specific type of pipe() usage that works in released R, but
not in r-devel.
In 4.3.2 on macOS, I can write to a connection returned by pipe(), i.e.
"hello, world" prints here:
> R.version.string
[1] "R version 4.3.2 (2023-10-31)"
> con <- pipe("cat")
> writeLines("hello, world", con)
hello, world
But in r-devel on
2009 Apr 28
2
problems with clipboard
Hi I'm a mac user. I have problems loading data from mac excel in R.
I'm using these script:
>library(utils)
>data2 <- read.table(file("clipboard"), header =T, sep ="\t")
____but this is the message that I have from R_____
Error in open.connection(file, "r") : cannot open the connection
In addition: Warning message:
In open.connection(file,
2012 Jul 21
1
Library control
All,
1. Is there a command that tells you what libraries are loaded?
2. How do you remove a library that has been loaded?
3. If you have loaded a library that masks previously loaded objects, how
can you tell which object is being run? In Matlab, I would run "which f" to
determine the location of the file f that will be run. Is there a similar
procedure in R?
David.
--
View this
2012 Aug 03
1
Printing contents of a variable
All,
Can someone explain why this does not print the contents of x when I source
this file?
CoinTosses <- function(n,print=TRUE) {
x <- sample(c(0,1), n, replace=TRUE)
y <- x
y[y==0] <- "T"
y[y==1] <- "H"
p <- sum(x)/n
p
}
x <- CoinTosses(40)
x
On the other hand, if I source this file:
CoinTosses <- function(n,print=TRUE) {
x <-