Using R to read and plot the csv data
2013-06-20 01:22
417 查看
Example code:
If you save these commands into a R file and then store it in a current work directory(getwd() to check it),
then input the Source("Your R file name"), it will run!
PS: you can change the current work directory by setwd or choose file--change the work directory in the
R GUI.
Reference: http://www.cyclismo.org/tutorial/R/plotting.html
w1<-read.csv(file="apple-table.csv",sep=",",head=TRUE) names(w1) hist(w1$Close,breaks=12,xlim=c(0,800)) #histgram form of the data boxplot(w1) # box form of the data plot(w1$Date,w1$Close,main="apple-table",xlab="Date",ylab="Close Price") #plot the column data of Close Price with Date
If you save these commands into a R file and then store it in a current work directory(getwd() to check it),
then input the Source("Your R file name"), it will run!
PS: you can change the current work directory by setwd or choose file--change the work directory in the
R GUI.
Reference: http://www.cyclismo.org/tutorial/R/plotting.html
相关文章推荐
- [Python] Read and plot data from csv file
- R转换.csv文件格式到.txt或.xlsx) [read.csv and export data to .txt or .xlsx]
- Collecting performance counters and using SQL Server to analyze the data
- How To Perform a Full Export And Exclude Certain Schemas Using The Data Pump API? [ID 1340781.1]
- using JS to control two select(html),the data can be loaded from database and XML,and show in the select
- How To Read and Write BLOB Data by Using ADO.NET with Visual C# .NET
- How To Read and Write BLOB Data by Using ADO.NET with Visual C# .NET
- Read and Write compressed data to a binary file using ASP.NET
- Python Web-第六周-JSON and the REST Architecture(Using Python to Access Web Data)
- Convert XML data to object and back using serialization
- C++: read access data using ADOX.DLL and System::Data::OleDb
- 6 ways to download free intraday and tick data for the U.S. stock market
- SQL Script for select data from ebs and make a csv file to FTP
- MS bug "The connection pool" in Oracle 10g and the data sort according to specified filed on DataGrid control.
- Add data to the Access database using ADO
- Using ASP.NET 3.5's ListView and DataPager Controls: Displaying Data with the ListView
- Along with all the above benefits, you cannot overlook the space efficiency and performance gains in using DataFrames and Dataset APIs for two reasons.
- Using the LND tool to analyze IBM Lotus Notes and Domino hangs and crashes
- Linux to read the Processor model, physical cores, virtual cores and L1, L2 cache
- Using Ldp.exe to Find Data in the Active Directory