Displaying 20 results from an estimated 40000 matches similar to: "data import: strange experience"
2012 Aug 15
4
Reading one column .csv file
My friend sent an Excel file:
http://msemac.redwoods.edu/~darnold/temp/cyu01_iqscores.xls
http://msemac.redwoods.edu/~darnold/temp/cyu01_iqscores.xls
I opened it in Excel, saved is as cyu01_iqscores.csv, then imported it into
R with:
iqscores=read.csv('cyu01_iqscores.csv',header=TRUE)
The result was:
> head(iqscores)
IQ.Scores X
1 145 NA
2 101 NA
3 123 NA
4
2004 Jul 07
7
Importing an Excel file
Hello, R users,
I am a very beginner of R and tried read.csv to import an excel file after
saving an excel file as csv. But it added alternating rows of fictitious NA
values after row number 16. When I applied read.delim, there were trailing
several commas at the end of each row after row number 16 instead of NA
values. Appreciate your help.
Kyong
[[alternative HTML version deleted]]
2016 Apr 26
2
How to print the frequency table (produced by the command "table" to Excel
Hi,
How could we print the frequency table (produced by "table") to an Excel
file?
Is there an easy way to do so? Thanks,
Miao
> df <- data.frame(x = 1:3, y = 3:1, z = letters[1:3])
> table(df[,c("y","z")])
z
y a b c
1 0 0 1
2 0 1 0
3 1 0 0
> test<-table(df[,c("y","z")])
> as.data.frame(test)
y z Freq
1 1 a
2016 Apr 26
0
How to print the frequency table (produced by the command "table" to Excel
Hi jpm miao,
You can get CSV files that can be imported into Excel like this:
library(prettyR)
sink("excel_table1.csv")
delim.table(table(df[,c("y","z")]))
sink()
sink("excel_table2.csv")
delim.table(as.data.frame(table(df[,c("y","z")])),label="")
sink()
sink("excel_table3.csv")
2011 May 26
1
R import glitch "missing data"
Hello!
I am trying import data into R and im running into a snag.
GOAL:
Import a 4 column, 8,000 row table into R including headers.
WHAT I'VE ATTEMPTED:
Original data was in Excel format.
Converted data to both a .txt and .csv (to see which worked better)
Imported data into R via commands as object "demand" (see below)
Please excuse the long file path.
2006 Jul 04
4
IMPORTING FILE FROM EXCEL
Hi
I am a beginner with R.
I have been trying to import a tab delimited excel file but i get the following error message
> file.show('C:\Documents and Settings\stats\Desktop\SUMI\plasma2.txt')
Warning message:
file.show(): file 'C:Documents and SettingsstatsDesktopSUMIplasma2.txt' does not exist
I have understood the programming part but i cannot go ahead unless i have
2004 Jan 02
3
Importing Excel/Openoffice Dates into R
Hi,
I would like to import some daily financial data from excel via csv.
More specifically, I would like to be able to use the ts.union function
from the tseries library as the dates are irregular and I need to line
up the dates so that I can place all the variables into one data frame.
The trouble is, how do I import the dates from excel into R? At the
moment I'm just importing the data
2006 Oct 30
4
for importing "data"
*I am a very new user of R. I've spent several hours trying to import
data, so I feel okay asking the list for help. *
*I had an Excel file, then I turned it into a "tab-delimited" file, as
instructed by directions My
filename is "lahore.txt" I amusing the following commands for read.delim but
i am getting following mesages. Sir i am sending you my excel data file i
2009 Jan 16
6
reading data from Excel Spread sheet
Hi all,
I tried to read data from Excel spread sheet with using
read.csv(file.choose())
and
read.delim(file.choose())
but its showing " *ÐÏ.à.*."
and also i tried with
read.table(file.choose())
then its showing " * V1
1 ÐÏ\021ࡱ* "
can any one suggest how to read data from Excel Spread sheet
2011 Oct 03
2
Import in R with White Spaces
Hi,
I have a simple question about importing data, I would be very grateful if
you could help me out.
I have used read.csv(file name, header=T, sep=",") to bring in a csv file I
saved in MS Excel.The problem is I have white spaces in the middle of values
(not in the column names), and this messes up the column entries. Since I
have many many files that I am importing and I have spaces
2011 Aug 20
4
I have a problem with R!!
Dear all
i?m working with a program i?ve made in R (using functions that others
created)
to run my program i need a sample. if i generate the sample using for
example, rnorm(n, mu, sigma) i have no problem
but if i obtain a sample from a column in excel and i copy it, the program
says that there is a mistake: it says "Error en `[.data.frame`(data,
indices) : undefined columns
2003 Jan 22
4
Read.table for macs
Dear All,
I've been using R for windows for a while, without too many problems.
However, I'm forced to use the MAC OS system for teaching, because our
teaching labs are mac only (not my idea!!). I have a very basic problem,
but one that doesn't appear on the FAQs. I simply want to import data
from a spreadsheet. I'm using exactly what works fine on Windows, namely:
1 save
2004 Oct 12
4
A question in R
I started to learn the R language, but I didn't suceed to use an external file.
Let say that I have an excel file called "test1.xls" in the directory
"C:/program files/R/rw2000/external_files" that looks like that:
name mark
yair 80
yosi 70 ...
In the appropriate directory I wrote this:
x<-read.delim("test1.xls")
or this:
2011 May 26
1
R-Size Limit (Confused)
Hello,
I've been banging my head against my monitor for some time now trying to
import data into R. The problem is either in my use of syntax, my data
format, or my memory. I have described what I have tried below. Please
help.
=========My GOAL==============================
>import a 4 column, 8,000 row table into R including headers.
=========WHAT I'VE
2003 Oct 29
2
importing SAS data
I am trying to import a permanent SAS data
set using read.ssd in the foreign library. I get
the following error:
> list.files("C:/temp")
[1] "newdat1.sas7bdat" "snpm1.sas7bdat" "test1.sas"
> library(foreign)
> newdat1 <- read.ssd("C:/temp","newdat1")
SAS failed. SAS program at
2012 Jun 04
2
Why do I have a column called row.names?
I'm trying to read in a tab separated table with read.delim().
I don't particularly care what the row names are.
My data file looks like this:
start stop Symbol Insert sequence Clone End Pair FISH
203048 67173930 ABC8-43024000D23 TI:993812543
TI:993834585
255176 87869359 ABC8-43034700N15 TI:995224581
TI:995237913
1022033 1060472
2011 Sep 08
2
problems with function read.table
Hello everyone
I have a couple of questions about the usage of the R function
"read.table(.)". My point of departure is that I want to import a matrix
(consisting of time and daily stock returns of many stocks) in R. Most of
the data is numeric, however some values are missing (blanks) and in other
cases I have the character "#DIV/0!" (from excel). My goal is to do some
2010 Apr 01
3
reading excel into R
Dear all,
I am new R user and I am sure that this question has been asked quite often
and I have also googled it and read about it! I understood that in order to
read excel sheet into R you need to open it and saved it as csv or text, is
this true? or you can use read.delim2 and read.csv2 to do this without the
following error
> dat <- read.csv2(file="C:\\Dokumente und
2012 Oct 05
11
Calculating the mean in one column with empty cells
Hi all,
I recently tried to calculate the mean and the median just for one column.
In this column I have numbers with some empty cells due to missing data.
So how can I calculate the mean just for the filled cells?
I tried:
mean(dataSet2$ac_60d_4d_after_ann[!is.na(master$ac_60d_4d_after_ann)],
na.rm=TRUE)
But the output was different to the calculation I died in Microsoft Excel.
Thanks in
2007 Jul 08
2
transform excel data into graph
Hello everyone,
I have a set of data in the following form, which are stored in an Excel
file:
nick john peter
lesson1 0.465 0.498 0.473
lesson2 0.422 0.44 0.134
lesson3 0.45 0.35 0.543
lesson4 0.590 0.64 0.11
lesson5 0.543