Displaying 20 results from an estimated 6000 matches similar to: "Need help with my homework"
2012 Feb 17
3
editing import data, strings
Regards.
I'm a beginner in programing, so I have a basic question for you.
If someone could help me please..
I want to create a function, which will be able to export files from excel.
I tried with
a <- read.csv(file, sep =",", as.is = TRUE, row.names = 1, header = TRUE),
.. but instead of numbers, it gives me strings for example: "299,311".
I can handle this string
2011 Jan 01
2
Problem with uploading library
Hello.
I'm new on that forum, so I would use some help... I'm programing with R
program, have some exercise to do.
So here it goes.
1. I have to upload two libraryes "sp" and "maptools"
2. This command is troubling me : towns <- readShapeSpatial("OB/OB.shp")
3. When I'm pressing f5, there is an error called: Error: could not find
function
2009 Dec 11
1
Sources for open sourced homework questions for R?
Hi,
I am teaching a one month class in applied statistics and want to
bring my students up to speed in R without devoting much/any lecture
time to R instruction. I think that the best way to do this is to
provide them with a lot of R questions for homework. These questions
would be numerous (there is a lot of material to cover), go from very
simple to somewhat complex, and focus on all the
2010 Sep 20
4
how to show the number of each axis interval (plot)
Dear List,
I am using plot for homework.
The x-axis covered from 0 to 80, with 4 intervals.
However, the plot only showed 0, 40, 80.
20 and 60 disappeared.
Please kindly advise how to show 0, 20, 40, 60, 80 for the axis interval.
Thank you.
Elaine
[[alternative HTML version deleted]]
2011 Apr 17
5
cube root
This is some interesting:
> -8^(1/3)
[1] -2
> x=(-8:8)
> y=x^(1/3)
> y
[1] NaN NaN NaN NaN NaN NaN NaN NaN
0.000000 1.000000
[11] 1.259921 1.442250 1.587401 1.709976 1.817121 1.912931 2.000000
So, can anybody explain this?! (Why is x[1]^(1/3)=y[1]=NaN, but
-8^(1/3)=-2?)
Thx!!!
[[alternative HTML version deleted]]
2007 Nov 07
1
Homework help: t test hypothesis testing with summarized data?
Is this how a t hypothesis test is done when I don't have the actual
data, but just the summarized statistics:
> #Homework 9.2.6 [1]
> n<-31
> xbar<-3.10
> s_x<-1.469
> m<-57
> ybar<-2.43
> s_y<-1.35
> s_pooled<- (((n-1)*s_x^2) + ((m-1)*s_y^2)) / (n + m - 2)
> s_pooled
[1] 1.939521
> t_obs <- (xbar - ybar) / (s_pooled * (sqrt(1/n + 1/m)))
2011 Mar 14
2
*Building* a covariance matrix efficiently
deaRs,
I want to build a covariance matrix out of the data from a binary
file, that I can read in chunk by chunk, with each chunk containing a
single observation vector X. I wonder how to do that most efficiently,
avoiding the calculation of the full symmetric matrices XX'. The
trivial non-optimal approach boils down to something like:
Q <- matrix(rnorm(100000),ncol=200)
M <-
2011 Feb 08
2
Plot colour according to column
Hi,
I am trying to plot several columns in different graphs in columns and rows.
The first column of my data file is the time, and the third is the
'elevation angle' with 19 different numbers. I would like to plot the rest
of the columns with the x axis as time and the individual angles in
different colours.
Here is the code I am using right now. It plots the different columns with
time,
2011 Aug 24
3
Efficient way to Calculate the squared distances for a set of vectors to a fixed vector
I am pretty new to R. So this may be an easy question for most of you.
?
I would like to calculate the squared distances of a large set (let's say 20000) of vectors (let's say dimension of 5) to a fixed vector.
?
Say I have a data frame MY_VECTORS with 20000 rows and 5 columns, and one 5x1 vector y. I would like to efficiently calculate the squared distances?between each of the 20000
2012 Mar 14
3
Creating 250 submatrices from a large single matrix with 2500 variables using loops
Dear all,
I have a large matrix with about 2500 variables, and 100 rows.
I would like to calculate the means of the every 10 variables starting from
1:2500 and saving the results as a vector or matrix.
How can I do that?
Alternatively, How can I create 250 subset matrices in the order of
variables 1:2500 in groups of 10 from the single matrix which had initially
2500 variables ?
I guess I have
2012 May 15
2
R
To all moderators i guess, my question was probably not clear this is not a homework, i am trying to understand R by doing some exercise in my book.
I will however participate a course in R in august and thought it could be good to have some
knowledge before. I hoped for help from you since i have no instructor to ask, that would have been
my first choice.
thanks anyway
Lotta
2008 Oct 14
4
problem using R
Hi ,
I am having serious trouble doing this homework. I am using R for doing the homework. I am having the following specific problem:
a) when I input the data using the command > Wbdc <-read.table("wdbc.txt")? I do not see the data.
b) When I want to run histogram using command > hist(area) I get an error message,
Error in hist(area) : object "area" not found.
?
I am
2012 Jan 25
2
having a bit of regression trouble
I got the code for how to do regression without an intercept out of the back
of my book and the next part of the homework asks me to do it with an
intercept. The problem is, Q1 disappears whenever I try. Here is my code:
Without the intercept:
load("tsa3.rda")
>
> Q=factor(rep(1:4,21))
> reg=lm(log(jj)~0+trend+Q,na.action=NULL)
> model.matrix(reg)
trend Q1 Q2 Q3 Q4
1
2012 Feb 15
3
built a lower triangular matrix from dataframe
Hello!
I'm trying to build a lower triangular matrix (with zeros in the diagonal)
from a particular dataframe.
The matrix I have to construct has 203 rows and 203 columns and that makes
20503 values to be included within (that's why I can't do it manually).
To illustrate the dataframe I have, I'll give you an example of a dataframe
and matrix with dimensions 6x6 (to make it
2011 Feb 13
4
A Math question
Dear all, I admit this is not anything to do R and even with
Statistics perhaps. Strictly speaking this is a math related question.
However I have some reasonable feeling that experts here would come up
with some elegant suggestion to my question.
Here my question is: What is sum of all Integers? I somewhere heard
that it is Zero as positive and negative integers will just cancel
each other out.
2008 Feb 13
2
Newbie HLM with lme4 questions
Dear R listers,
I know I'm breaking the rules by asking a "homework" related question--
I hope you'll forgive me. I am a social psychology graduate student,
and the only one in my department who uses R. I successfully completed
my multiple regression and structural equation modeling courses using
R (John Fox's car and sem packages were a big help, as was his book).
2011 Feb 23
4
The L Word
I've been wondering what L means in the R computing context, and was
wondering if someone could point me to a reference where I could read about
it, or tell me what it's called so that I can search for it myself. (L by
itself is a little too general for a search term).
I encounter it in strange places, most recently in the "save" documentation.
save(..., list = character(0L),
2008 Aug 25
1
aov, lme, multcomp
I am doing an analysis and would like to use lme() and the multcomp
package to do multiple comparisons. My design is a within subjects
design with three crossed fixed factors (every participant sees every
combination of three fixed factors A,B,C). Of course, I can use aov() to
analyze this with an error term (leaving out the obvious bits):
y ~ A*B*C+Error(Subject/(A*B*C))
I'd also like
2007 Oct 31
3
Homework help: Is this how CIs of normal distributions are computed?
I'm looking for a function in R similar to t.test() which was generously
pointed out to me yesterday, but which can be used for normally
distributed data.
To recap yesterday:
> x <- scan()
1: 62 52 68 23 34 45 27 42 83 56 40
12:
Read 11 items
> alpha<- .05
> t.test(x)
One Sample t-test
data: x
t = 8.8696, df = 10, p-value = 4.717e-06
alternative hypothesis: true
2012 May 15
9
help
1. Emma is performing an experiment that requires individual handling of some animals. The sizes of the animals are lognormally distributed: The natural logarithms of their sizes has a normal distribution with mean 3 and standard deviation 0.4. The time (in minutes) it takes to handle each animal is given by
10 + s · 1.5 + eε for animals with s ≤ 20 20 + s · 0.8 + eε for animals with s > 20