Re: [R] data analysis. R

2009-03-22 Thread UBC
thx for ur fast responds. but sorry for asking stupid, i am a turn beginner of R (just trying it out <3 months, and i am taking my first course about it) so, to tackle this questions, i was told to use "nested design" method, could you actually show me how would u attempt this problem? (a) Determi

Re: [R] data analysis. R

2009-03-21 Thread Dylan Beaudette
On Sat, Mar 21, 2009 at 5:13 PM, UBC wrote: > > so i am having this question > what should i do if the give data file (.txt) has 4 columns, but different > lengths? > how can i read them in R? > any idea for the following problem? > > > Gas consumption (1000 cubic feet) was measured before and aft

Re: [R] data analysis. R

2009-03-21 Thread Gabor Grothendieck
This works with the example. If the real data is different it may not work. To run the example below just copy and paste it into R. To run with the real data replace textConnection(Lines) with "insulation.txt" everywhere. Lines <- "Before insulAfter insul. tempgas tempgas -0.8

Re: [R] data analysis. R

2009-03-21 Thread jim holtman
If the input file has a separator other than a space (e.g., tabs or commas) then you can read it is and the missing data will be NAs and you can decide how to handle it. If it does not have a separator, then maybe you can read it in with read.fwf. Otherwise when you read it in, you can tell the s

[R] data analysis. R

2009-03-21 Thread UBC
so i am having this question what should i do if the give data file (.txt) has 4 columns, but different lengths? how can i read them in R? any idea for the following problem? Gas consumption (1000 cubic feet) was measured before and after insulation was put into a house. We are interested in loo