Hi there, I'm looking to analyze a set of data on local gas prices for a single day. I'm wondering what kind of questions I should be looking to ask and how to find and answer to them with R. Examples would be: Do prices differ between brands? Does location affect (NE, NW, SE, SW) price? Does the number of nearby (within .25 miles) competitors affect price? Do gas stations near shopping centers or highways have different prices? Also, could anyone help me figure out how to import a data table to R? When I try to create a .txt file from a word document and read it in R, the format of the first column always messes up. Any/all help is appreciated. -- View this message in context: http://r.789695.n4.nabble.com/Data-Analysis-for-Gas-Prices-tp4155078p4155078.html Sent from the R help mailing list archive at Nabble.com.
use a < ? > to get help on a function; example: ?read.table If you do this you will see an option called "header"... use header=T if your top row contains column names. Learn how to read these help pages. Also, read thru a few beginner R manuals and see this website: http://www.statmethods.net/interface/io.html As for the rest of your questions..... Perhaps this is your sign to begin reading a intro-stats book, or inquire on a different forum. see: http://stats.stackexchange.com/questions good luck inferno846 wrote> > Hi there, > > I'm looking to analyze a set of data on local gas prices for a single day. > I'm wondering what kind of questions I should be looking to ask and how to > find and answer to them with R. Examples would be: > > Do prices differ between brands? > Does location affect (NE, NW, SE, SW) price? > Does the number of nearby (within .25 miles) competitors affect price? > Do gas stations near shopping centers or highways have different prices? > > Also, could anyone help me figure out how to import a data table to R? > When I try to create a .txt file from a word document and read it in R, > the format of the first column always messes up. Any/all help is > appreciated. >-- View this message in context: http://r.789695.n4.nabble.com/Data-Analysis-for-Gas-Prices-tp4155078p4155185.html Sent from the R help mailing list archive at Nabble.com.
On Sat, 3 Dec 2011 14:11:39 -0800 (PST) inferno846 <robertf at uoregon.edu> wrote: ...> > Also, could anyone help me figure out how to import a data table to > R? When I try to create a .txt file from a word document and read it > in R, the format of the first column always messes up. Any/all help > is appreciated. >For reading in data, avoid using Word, a program that is overkill for almost all purposes. Either use Notepad, or grab a simple text editor off the internet - preferably capable of block selection. Since you do not say just how the "first column messes up," it is rather problematic trying suggest a solution the problem. The first line of the table and a couple data lines, the form of command you use to read in the data and the field separator in your table are all useful pieces of information. There are however a great many books about R out there and nearly all of them address at least briefly how to import data. Portland has one of the best bookstores on the planet. As a last resort you might try the command ??read.table from the R prompt. JD
Possibly Parallel Threads
- [libunwind][Mips] Problem using gas to assemble UnwindRegistersSave.S
- [klibc:master] Kbuild: Tell gas we don't want executable stacks
- [LLVMdev] Mod for using GAS with MS VC++
- [LLVMdev] Parsing dwarf debug info of an GAS assembly file
- [LLVMdev] Mod for using GAS with MS VC++