# Using data files with statistical and mathematical software on IUanyWare

When using local data files with an IUanyWare application, you must point the application to the location of those files (in a folder on your computer's hard drive or on a flash drive).

In an application with a graphical user interfaces, to point to the appropriate drive, folder, and file(s), use the Open dialog box in the File menu (see Save your files when using an IUanyWare application).

In an application with a command-line or text user interface, you may need to type the path to the local files along with application-specific commands, statements, and/or arguments. See the examples below, depending on the application you are using:

Three examples are provided for each application (except R):

• Read in a software-specific file or library.
• Import a Microsoft Excel file. (Due to compatibility issues between 64-bit and 32-bit Excel files, you may need to save your Excel files in .csv format.)
• Read in a tab-delimited text file with three variables and variable names in the first row

Each example assumes your local data files are stored in a Temp folder on your desktop (Windows: C:\\Users\You\Desktop\Temp; macOS: /Users/You/Desktop/Temp). Customize the local path and commands, as needed, depending on the location of your file(s).

If you have questions about using statistical and mathematical software at Indiana University, contact Research Analytics.

## R

R does not have its own data format. Additionally, UITS does not recommend that you import data into R directly from an Excel file. Rather, you should save the Excel spreadsheet as a CSV file or a text file and use one of the following commands:

 Comma-delimited file data <- read.csv("//Client/C$/Users/You/Desktop/Temp/test.csv", header=T)  Tab-delimited text file data <- read.table("//Client/C$/Users/You/Desktop/Temp/test.txt", header=T) 

## Stata

 Stata data file use "\\Client\C$\Users\You\Desktop\Temp\test.dta", clear Excel file import excel "\\Client\C$\Users\You\Desktop\Temp\text.xlsx", clear Tab-delimited text file insheet using "\\Client\C\$\Users\You\Desktop\Temp\test.txt", clear

This is document bbtr in the Knowledge Base.