Hello Maryam,
The haven function for reading Stata files is read_dta (not read.dta!!!). May
this be your issue?
Iago
De: R-help de part de Maryam Iraniparast
Enviat el: dilluns, 14 de novembre de 2022 19:07
Per a: r-help@r-project.org
Tema: [R] Importing
Hello!
I want to read SPSS data into R and I want to carry the value labels with my
dataset.
Based on my research, only Stata file can transfer the value labels to R (It is
easy to save SPSS data with Stata format).
The last time I did that successfully, I was using R4.2.1 and the following
cod
Thanks a lot. I’ve got it just now.
On Wed, Aug 26, 2020 at 6:03 PM peter dalgaard wrote:
> It is because you don't know whether you want it or not.
>
> It is a bit more obvious with integer indexing, as in color[race]: if race
> is NA you don't know what color to put in, but the result should b
Thanks for your reply.
You're right, here is what I did:
> library(foreign)
> sz201401=read.spss("/Users/e.daadmehr/Desktop/Term/LastLast/untitled
folder/2014/1.sav", to.data.frame=TRUE)
Warning message:
In read.spss("/Users/e.daadmehr/Desktop/Term/LastLast/untitled
folder/2014/1.sav", :
/
Thanks guys. but I'm a bit confused. the input is the first column (z[,1]
and z1[,1]).
How is it possible that a subset of a non-NA vector, contains NA?
On Wed, Aug 26, 2020 at 4:58 PM Eric Berger wrote:
> Good point! :-)
>
>
> On Wed, Aug 26, 2020 at 5:55 PM peter dalgaard wrote:
>
>> Offhand,
It is because you don't know whether you want it or not.
It is a bit more obvious with integer indexing, as in color[race]: if race is
NA you don't know what color to put in, but the result should be the same
length as race.
With logical indices, the behaviour is a bit annoying, but ultimatel
c(1:3)[c(1,NA,3)]
[1] 1 NA 3
On Wed, Aug 26, 2020 at 6:06 PM Elham Daadmehr wrote:
> Thanks guys. but I'm a bit confused. the input is the first column (z[,1]
> and z1[,1]).
> How is it possible that a subset of a non-NA vector, contains NA?
>
> On Wed, Aug 26, 2020 at 4:58 PM Eric Berger wrot
Good point! :-)
On Wed, Aug 26, 2020 at 5:55 PM peter dalgaard wrote:
> Offhand, I suspect that the NAs are in the 8th column.
>
> > On 26 Aug 2020, at 10:57 , Elham Daadmehr wrote:
> >
> > Hi all,
> >
> > I have a simple problem. I get stuck in using the imported spss data
> (.sav)
> > using
Offhand, I suspect that the NAs are in the 8th column.
> On 26 Aug 2020, at 10:57 , Elham Daadmehr wrote:
>
> Hi all,
>
> I have a simple problem. I get stuck in using the imported spss data (.sav)
> using "read.spss".
> I imported data (z) without any problem. After importing, the first column
Hi Elham,
You are not giving us much to go on here.
Show us the commands that (a) confirm there are no NA's in the first column
of z
and (b) output a row of z that has an NA in the first column.
Here's how one might do this:
(a) sum(is.na(z[,1]))
(b) z[ match(TRUE, z[,8] %in% c("11","12","14")), ]
Hi all,
I have a simple problem. I get stuck in using the imported spss data (.sav)
using "read.spss".
I imported data (z) without any problem. After importing, the first column
doesn't contain any "NA". but when I choose a subset of it (like:
z[z[,8]=="11"|z[,8]=="12"|z[,8]=="14",]), lots of NA a
Dear Jihee,
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of ???
> Sent: Wednesday, January 16, 2019 7:02 PM
> To: Fox, John
> Cc: r-help@r-project.org
> Subject: Re: [R] importing data error question
>
> Thanks for your
doesn't change.
Best,
Jihee
From: "Fox, John"
Sent: Thursday, January 17, 2019 1:59:03 AM
To:"우지희"
Cc:"r-help@r-project.org"
Subject:Re: [R] importing data error question
Dear jihee,
I've looked into this problem further, using my Mac
have no idea neither. ;(
> I might give up from now,,
>
>
> Thanks again!
>
> Best,
> Jihee
>
>
>
> From: "Fox, John"
> Sent: Friday, January 18, 2019 12:02:42 AM
> To:"우지희"
> Cc:""
> Subject:Re: [R
t; Jihee
>
> <528c421a382d426895f6446b32fbc6f0.png>
>
> From: "Fox, John"
> Sent: Thursday, January 17, 2019 2:09:52 PM
> To:"우지희"
> Cc:""
> Subject:Re: [R] importing data error question
>
>
> Dear Jihee,
>
> T
ged... with that {r} message at R Markdown.
>
> There's no dataset.
>
> i tried both .xls and .xlsx .
>
>
> Jihee
>
>
>
>
>
>
>
> From: "Fox, John"
> Sent: Thursday, January 17, 2019 10:59:44 AM
> To:"우지희"
>
uot;R commander"? I have no
> idea why it doesn't change.
>
> Best,
> Jihee
>
> From: "Fox, John"
> Sent: Thursday, January 17, 2019 1:59:03 AM
> To:"우지희"
> Cc:"r-help@r-project.org"
> Subject:Re: [R] importing data error que
at were the case I would have expected the
>> problem to have surfaced earlier. Did you try reading another kind of file,
>> such as a plain-text data file?
>>
>> --> I don't know what is plain-text data file.
>
> A plain-text data file could, e.g., be create
data file?
>
> --> I don't know what is plain-text data file.
A plain-text data file could, e.g., be created from an Excel file by exporting
a worksheet as a .csv (comma-separated-values) file; you could read this into
the Rcmdr via Data > Import data > from text file, speci
another kind of file,
such as a plain-text data file?
--> I don't know what is plain-text data file.
i'll try R with English.
From: "Fox, John"
Sent: Monday, January 14, 2019 11:15:36 PM
To:"우지희"
Cc:""
Subject:Re: [R] impo
Dear jihee,
> On Jan 13, 2019, at 9:28 PM, 우지희 wrote:
>
>
>
> From: "우지희"
> Sent: Monday, January 14, 2019 9:40:26 AM
> To:"Fox, John"
> Subject:Re: [R] importing data error question
>
>
> Thanks for your replies.
>
> I
lf Of ???
>> Sent: Friday, January 11, 2019 9:14 AM
>> To: r-help@R-project.org
>> Subject: [R] importing data error question
>>
>> Hi I'm jihee and I have a question about error...
>>
>> I'm using R 3.5.2 and tried to use Rcmdr package.
>&g
R-help On Behalf Of ???
> Sent: Friday, January 11, 2019 9:14 AM
> To: r-help@R-project.org
> Subject: [R] importing data error question
>
> Hi I'm jihee and I have a question about error...
>
> I'm using R 3.5.2 and tried to use Rcmdr package.
>
> and using F
Hi I'm jihee and I have a question about error...
I'm using R 3.5.2 and tried to use Rcmdr package.
and using FactoMineR and SensoMineR to analyze sensory data through PCA
but i can't import excel data with Rcmdr.
it has this messege :
Error in structure(.External(.C_dotTclObjv, objv), cl
ginal Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Paolo Letizia
Sent: Wednesday, June 08, 2016 8:40 PM
To: r-help@r-project.org
Subject: [R] Importing data from a text file with no separator
I have row data in a text file, where each row consists of 22 numerical
chara
?read.fwf
There is a data import/export document on cran.r-project.org
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Paolo Letizia
Sent: Wednesday, June 08, 2016 8:40 PM
To: r-help@r-project.org
Subject: [R] Importing data from a text file with no
See:
?read.fwf
Example:
> ff <- tempfile()
> cat(file = ff, "10030614911608", "10030614911608", sep =
"\n")
> read.fwf(ff, widths = c(2,8,10), colClasses = "character")
V1 V2 V3
1 10 03061490 000116
2 10 03061490 000116
> unlink(ff)
Hth,
Adrian
On Thu,
I have row data in a text file, where each row consists of 22 numerical
characters. Each row consists of three different column but there is no
separator. Specifically, the first two characters of the raw represent the
first column of data, the subsequent 8 characters represent the second
column o
"b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s"
[20] "t" "u" "v" &
Hi Mario,
It is at the limit of my skills so I'm not sure this will be a real
solution. But it might help you anyway (and there will be more competent
people anyway).
What does not make sense to me is why you set the names of your files
and then use them to list them with list.files()
What
Hello everyone,
So, rookie me is trying to write a smart code, so here's what I'm doing:
I have a list of a couple of hundrend files, some of which refer to different
experiments.
The naming of the file refers to the experiment and the serial number to the
topological reference on my sample.
Hi,
May be this helps:
url <-
"http://genome.ucsc.edu/cgi-bin/hgc?hgsid=358528009&g=htcDnaNearGene&i=uc003qec.4&c=chr6&l=133562494&r=133853258&o=knownGene&hgSeq.promoter=on&boolshad.hgSeq.promoter=0&hgSeq.promoterSize=10759&hgSeq.utrExon5=on&boolshad.hgSeq.utrExon5=0&hgSeq.cdsExon=on&boolshad.hgSe
m.
To: r-help@r-project.org
Subject: [R] Importing data by odbcConnectExcel in 64 bit
I have probably an old question.
I have R.3.0.1 installed in 64 bit windows 7. The odbcConnectExcel in RODBC
library does not work. Tried odbcConnectExcel2007 still does not work.
Any ideas.
Thanks
Meliss
Can't help you with the odbcConnectExcel, but I can suggest an alternative
... loadWorkbook() and readWorksheet() in the XLConnect package work on
Windows 7 64-bit.
library(XLConnect)
wb <- loadWorkbook("C:/Temp/Mydata.xlsx")
dat <- readWorksheet(wb, sheet="Sheet1")
Jean
On Tue, Jul 16, 2013 at
I have probably an old question.
I have R.3.0.1 installed in 64 bit windows 7. The odbcConnectExcel in RODBC
library does not work. Tried odbcConnectExcel2007 still does not work.
Any ideas.
Thanks
Melissa<-sqlFetch(odbcConnectExcel2007("F:\\Cotton2012\\validation.xlsx"),sqtable
= "Sheet3",
+
This code is indeed much shorter. About the speed, I guess it should be
faster, but you should test it with system.time()
I'm glad that it helped.
Ivan
--
Ivan CALANDRA
Université de Bourgogne
UMR CNRS/uB 6282 Biogéosciences
6 Boulevard Gabriel
21000 Dijon, FRANCE
+33(0)3.80.39.63.06
ivan.cala
Dear Ivan,
It works perfectly fine now. I love this code more since I need not delete
the NULL list myself (and it should be faster, right?). Thank you very much
for your help!
cheers,
Ray
On Mon, Jan 28, 2013 at 5:32 PM, Ivan Calandra wrote:
> What about this then:
> list_of_datasets <- lappl
What about this then:
list_of_datasets <- lapply(file_names, read.table, other_args_to_read.table)
Something that might then be useful is:
names(list_of_datasets) <- file_names
Does it do it now?
Ivan
--
Ivan CALANDRA
Université de Bourgogne
UMR CNRS/uB 6282 Biogéosciences
6 Boulevard Gabriel
Thanks a million for all help provided!! I can do what I intend to using
the "for loop". However, I'm still eager to try the list.files approach.
Here is the error message that I got using Ivan's code:
> list_of_dataset <- do.call(read.table, file_names)
Error in do.call(read.table, file_names) :
Hi Ray!
I'm insisting with list.files...!
What about like this (untested)?
file_names <- list.files(path="C:/.../data", pattern=".dat$",
full.names=TRUE)
list_of_dataset <- do.call(read.table, file_names)
Let me know if this helps!
Ivan
--
Ivan CALANDRA
Université de Bourgogne
UMR CNRS/uB 6282
Hi Ray,
Comments below:
On 26 January 2013 09:03, Ray Cheung wrote:
[snip]
> ###FUNCTION TO READ FILES
> little_helpful <- function(n) {
> file_name <- paste0("C:/.../data", n, ".dat")
> read.table(file_name)
> }
>
> ###RETURN AN OBJECT WHICH CHECKS FOR THE EXISTENCE OF FILES
> check <- function
Thanks for your commands, Ivan and Michael! However, I am still not
producing the right codes. Would you please help me on this? I've written
the following codes. Please comment. Thank you very much.
Task: Reading data1.dat to data1000.dat (with missing files) into R.
Missing files can be omitted
Hi,
Not sure this is what you need, but what about list.files()?
It can get you all the files from a given folder, and you could then
work this list with regular expressions for example.
HTH,
Ivan
--
Ivan CALANDRA
Université de Bourgogne
UMR CNRS/uB 6282 Biogéosciences
6 Boulevard Gabriel
210
On Fri, Jan 25, 2013 at 6:11 AM, Ray Cheung wrote:
> Dear Michael,
>
> Thanks for your codes. However, lapply does not work in my case since I've
> some files missing in the data (say, the file data101.dat). Do you have any
> suggestions on this?? Thank you very much.
>
You could simply add a tes
Dear Michael,
Thanks for your codes. However, lapply does not work in my case since I've
some files missing in the data (say, the file data101.dat). Do you have any
suggestions on this?? Thank you very much.
Best Wishes,
Ray
On Wed, Jan 23, 2013 at 8:15 PM, R. Michael Weylandt <
michael.weyla...
On Wed, Jan 23, 2013 at 9:16 AM, Ray Cheung wrote:
> Dear All,
>
> Sorry for asking a newbie question. I want to ask how to import 1000
> datasets whose file names are labelled from data1.dat to data1000.dat into
> R so that they are named M[1, , ] to M[1000, , ] accordingly. Thank you
> very much
Dear All,
Sorry for asking a newbie question. I want to ask how to import 1000
datasets whose file names are labelled from data1.dat to data1000.dat into
R so that they are named M[1, , ] to M[1000, , ] accordingly. Thank you
very much.
Best Regards,
Ray
[[alternative HTML version delete
Cc:
Sent: Wednesday, November 14, 2012 11:52 PM
Subject: [R] Importing Data for a two sample t-test
I am trying to do a two sample t-test with data that i received in a text
document. one list has the slab weights and the second has the company it
is associated with. here is an example.
weight
On 2012-11-14 20:52, nilsonern wrote:
I am trying to do a two sample t-test with data that i received in a text
document. one list has the slab weights and the second has the company it
is associated with. here is an example.
weights company
1 A
2 A
2
elp@r-project.org
Cc:
Sent: Wednesday, November 14, 2012 11:52 PM
Subject: [R] Importing Data for a two sample t-test
I am trying to do a two sample t-test with data that i received in a text
document. one list has the slab weights and the second has the company it
is associated with. here is
?subset
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Enginee
I am trying to do a two sample t-test with data that i received in a text
document. one list has the slab weights and the second has the company it
is associated with. here is an example.
weights company
1 A
2 A
2 B
3 B
I wa
On 16.04.2012 12:56, Søren Andersen wrote:
Hi everyone!
I am very new at R. I am trying to import a data file from stata to R on a
Macintosh system ? When I use the foreign function read.dta it says:
You forgot to load foreign:
library("foreign")
Uwe Ligges
Error: could not f
Hi everyone!
I am very new at R. I am trying to import a data file from stata to R on a
Macintosh system ? When I use the foreign function read.dta it says:
Error: could not find function "read.dta"
p
[[alternative HTML version deleted]]
il.com
> CC: r-help@r-project.org
> Subject: Re: [R] Importing data from MS EXCEL (.xls) to R
>
> Hi Dan,
>
> You might try
>
> require(gdata)
> ?read.xls
>
> HTH,
> Jorge
>
>
> On Wed, Aug 24, 2011 at 6:20 PM, Dan Abner <> wrote:
>
I agree with Ken.. if you can, save it as a CSV file. But if you have a
bunch of these, then it isn't very efficient. I use read.xlsx() from the
package "xlsx".
I notice that you are using the full path.. have you tried changing
directories?... I find it is best to compartmentalize my work and
Hi Dan,
You might try
require(gdata)
?read.xls
HTH,
Jorge
On Wed, Aug 24, 2011 at 6:20 PM, Dan Abner <> wrote:
> Hello everyone,
>
> What is the simplest, most RELIABLE way to import data from MS EXCEL (.xls)
> format to R? In the past I have used the read.xls() function from the
> xlsReadWri
Hello everyone,
What is the simplest, most RELIABLE way to import data from MS EXCEL (.xls)
format to R? In the past I have used the read.xls() function from the
xlsReadWrite package, however, I have been wrestling with it all afternoon
long with no success. I continue to receive the following err
> -Original Message-
> From: gerald.j...@dgag.ca [mailto:gerald.j...@dgag.ca]
> Sent: Friday, February 05, 2010 10:58 AM
> To: William Dunlap
> Cc: Uwe Ligges; r-help@r-project.org
> Subject: RE: [R] Importing data coming from Splus into R.
>
> Hello Bill,
>
S+'s
> write.table and R's read.table I could try to fix
> things up so they were more compatible.
>
> Code that reads the S+ native binary format must
> be 32/64 bit aware, since S+ integers are 32 bits
> on 32-bit versions of S+ and 64 bits on 64-bit
> versions.
>
&
; To: Gerald Jean
> Cc: r-help@r-project.org
> Subject: Re: [R] Importing data coming from Splus into R.
>
> 1. I am stuck with a copy of S-PLUS 4.x. At that time I used
> dump() in
> S-PLUS and source() to get things into R afterwards ...
>
> 2. Why do you think that 32
Uwe Ligges a écrit sur 2010/02/05
11:04:44 :
> 1. I am stuck with a copy of S-PLUS 4.x. At that time I used dump() in
> S-PLUS and source() to get things into R afterwards ...
>
> 2. Why do you think that 32-bit vs. 64-bit issues matter? The file
> format does not change (well, this is guessed s
1. I am stuck with a copy of S-PLUS 4.x. At that time I used dump() in
S-PLUS and source() to get things into R afterwards ...
2. Why do you think that 32-bit vs. 64-bit issues matter? The file
format does not change (well, this is guessed since I do not have any
64-bit S-PLUS version availabl
Have you tried dput/dget or dump/source?
On the S-Plus side, you need to tell it to use the older format.
Rich
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/p
Hello there,
I spent all day yesterday trying to get a small data set from Splus into R,
no luck! Both, Splus and R, are run on a 64-bit RedHat Linux machine, the
versions of the softwares are 64-bit and are as what follows:
Splus:
TIBCO Software Inc. Confidential Information
Copyright (c) 1988
Martyn Plummer-2 wrote:
>
> I wrote a function called "bugs2jags", which you will find in the coda
> package, for converting WinBUGS data files into the data format used by
> JAGS which is, by no coincidence, the format used by the R function
> dump().
>
First of all excuse me for reviving thi
p-boun...@r-project.org
>> [mailto:r-help-boun...@r-project.org] On Behalf Of delnatan
>> Sent: Saturday, October 24, 2009 8:32 PM
>> To: r-help@r-project.org
>> Subject: [R] Importing data from text file with mixed format
>>
>>
>> Hi,
>> I'
This solution uses strapply in gsubfn. It assumes the timepoints are
1, 2, 3, ... (although later we remove this restriction just in case).
The first line reads in myfile. The second line reads the numeric rows
into matrix s. The third line reads in the column names. The fourth
line converts to
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of delnatan
> Sent: Saturday, October 24, 2009 8:32 PM
> To: r-help@r-project.org
> Subject: [R] Importing data from text file with mixed format
>
>
>
try this:
> # read in the file
> x <- readLines(textConnection("#begin text file
+ Timepoint 1
+ ObjectNumber Volume SurfaceArea
+ 1 5.3 9.7
+ 2 4.9 8.3
+ 3 5.0 9.1
+ 4 3.5
Hi,
I'm having difficulty importing my textfile that looks something like this:
#begin text file
Timepoint 1
ObjectNumber Volume SurfaceArea
1 5.3 9.7
2 4.9 8.3
3 5.0 9.1
4 3.5
On Thu, 2009-05-14 at 10:30 -0700, Sunita22 wrote:
> Hello
>
> I have to import 2 txt files into R. 1 file contains the data and the other
> contains the header, column headings, datatypes and labels for the data.
>
This is your first complicating factor.
> I have 2 problems:
>
> 1) my data fi
Hello
Yes I have used read.table("file name", sep="\t") for reading the text file
Thank you
On Thu, May 14, 2009 at 11:07 PM, jim holtman wrote:
> What have you tried? Check the Intro manual for hints.
>
> ?read.table probably using sep='\t'
>
> On Thu, May 14, 2009 at 1:30 PM, Sunita22 wr
What have you tried? Check the Intro manual for hints.
?read.table probably using sep='\t'
On Thu, May 14, 2009 at 1:30 PM, Sunita22 wrote:
>
> Hello
>
> I have to import 2 txt files into R. 1 file contains the data and the other
> contains the header, column headings, datatypes and labels f
Hello
I have to import 2 txt files into R. 1 file contains the data and the other
contains the header, column headings, datatypes and labels for the data.
I have 2 problems:
1) my data file has mixed type of data e.g. 1 2 3 4 5 3-5 02/04/06 3 4 5 and
so on, the data file is tab separated. when
ead
> union
> select * from iristail')
> sqldf()
>
>> sqldf("select * from sqlite_master",dbname="mydb")$name
> [1] irishead iristail fulltable
> Levels: fulltable irishead iristail
>
> ? ...I'll try to go figure a few more things out in
df()
> sqldf("select * from sqlite_master",dbname="mydb")$name
[1] irishead iristail fulltable
Levels: fulltable irishead iristail
? ...I'll try to go figure a few more things out in the in the meantime (like
using sep="\t" ?) and using connections with s
Have just added an example 12 on the home page:
http://sqldf.googlecode.com
that shows an example. Note use of notation
main.mytable to refer to an existing table in the
main database (as opposed to a data frame in R).
On Thu, Feb 19, 2009 at 11:55 PM, Stephen Tucker wrote:
> Hi all,
>
> I am
Hi all,
I am attempting to learn SQL through sqldf...
One task I am particularly interested in is merging separate
(presumably large) files into a single table without loading these
files into R as an intermediate step (by loading them into SQLite and
merging them there).
Taking a step back, I'v
Kisch, Joe wrote:
I hope this is not a stupid question, but I am having difficulty
importing data from sources like CDs, HDD, or flashcards. Can anyone
help ?
Joe
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
I hope this is not a stupid question, but I am having difficulty
importing data from sources like CDs, HDD, or flashcards. Can anyone
help ?
Joe
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch
On Thu, 29 Jan 2009, Christian Anderson wrote:
Hello R-Help,
I noticed that there is a thread about importing data from the clipboard
that is very poorly answered in the forum. One user suggests giving up, the
other gives a solution that echoes the clipboard, but that's exactly the
same as just
Hello R-Help,
I noticed that there is a thread about importing data from the clipboard
that is very poorly answered in the forum. One user suggests giving up, the
other gives a solution that echoes the clipboard, but that's exactly the
same as just ctrl-p. As I am asked this question at least once
On Wed, 7 Jan 2009, Florent Bresson wrote:
Dear R-users,
I'm facing a problem with the import of data in R. I have a sav file that, I
presume, uses some Arabic encoding (but I don't know which one) and I would
like to read it with R. When I use the function read.spss (I also tried
spss.get(H
Dear R-users,
I'm facing a problem with the import of data in R. I have a sav file that, I
presume, uses some Arabic encoding (but I don't know which one) and I would
like to read it with R. When I use the function read.spss (I also tried
spss.get(Hmisc)), I get the following message:
> read.sp
Jon Wong wrote:
Hi,
I was wondering if I could get some help on importing data into a
three-dimensional array?
I am importing data from several text files:
dsdir<-"c:/documents and settings/desktop/07082008/" # path to files
dsfb1<-"07082008-DI4129b.dat" # file base name
firsthour<-13 # firs
Hi,
I was wondering if I could get some help on importing data into a
three-dimensional array?
I am importing data from several text files:
dsdir<-"c:/documents and settings/desktop/07082008/" # path to files
dsfb1<-"07082008-DI4129b.dat" # file base name
firsthour<-13 # first hour of observatio
Greg Snow wrote:
> It looks like your original data may be tab seperated, if that is the case
> then just use read.delim or use sep='\t' in read.table or scan.
>
I think that was only half the problem. If you do that, you end up with
one column containing both City and State, comma-separated. P
vid Arnold
> > Sent: Friday, June 13, 2008 5:15 PM
> > To: r-help@r-project.org
> > Subject: [R] Importing data with different delimters
> >
> > All,
> >
> > I have a data file with 56 entries that looks like this:
> >
> > City State JanT
e-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of David Arnold
> Sent: Friday, June 13, 2008 5:15 PM
> To: r-help@r-project.org
> Subject: [R] Importing data with different delimters
>
> All,
>
> I have a data file with 56 entries that looks like this:
Assuming that the only problem is the blank in the city names, here is
one way of doing it:
> inFile <- textConnection("City State JanTemp Lat Long
+ Mobile, AL 44 31.288.5
+ Montgomery, AL 38 32.986.8
+ Phoenix, AZ 35 33.6112.5
+ Little Rock, AR 31
All,
I have a data file with 56 entries that looks like this:
City State JanTemp Lat Long
Mobile, AL 44 31.288.5
Montgomery, AL 38 32.986.8
Phoenix, AZ 35 33.6112.5
Little Rock, AR 31 35.492.8
Los Angeles, CA 47 34.3118.7
San Franci
On Fri, 23-May-2008 at 08:40PM -0700, amarjit singh sethi wrote:
|> Dear all,
|> I am quite new to R; facing certain problems:
|> Say, I have a text file( named as "try"):
|> > idt=read.table(df,header=T, sep="\t")
|> > idt
|> Year C1 C2 C3 C4 C5 C6
|> 1 Y1 3.5 13.8 9.5 6.8 0.4
Dear AJSS,
The problem is that the way you've read the data, the first column of
the data frame is a factor, not a numerical variable, and thus is not
suitable for computing correlations.
You could use the command cor(idt[,-1]) to compute correlations on all
but the first column, but your
Dear all,
I am quite new to R; facing certain problems:
Say, I have a text file( named as "try"):
YearC1 C2 C3 C4 C5 C6
Y1 3.5 13.89.5 6.8 0.4 24.2
Y2 3.8 13.99.9 7.6 0.7 12.8
Y3 4.5 14.514.29.2 0.6
import stata data should be straight. take a look at foreign package
On Wed, May 7, 2008 at 9:30 AM, Yemi Oyeyemi <[EMAIL PROTECTED]> wrote:
> Hi everyone, please I'm having problem importing data from Stata and excel.
> Help me out.
> Thanks
>
>
> -
> [[elide
Yemi Oyeyemi wrote:
>
> Hi everyone, please I'm having problem importing data from Stata and
> excel. Help me out.
> Thanks
>
>
You don't provide...
a) the code that you've tried
b) the error message that relates to the problem you are having
...without these people have little informat
i usually import data from exel, using read.table or read.csv (which implies
that i have to save exel files as .txt or .csv)
JM
El Miércoles, 7 de Mayo de 2008 11:25, John Kane escribió:
> First step would be to read the manual on the R site
> "R Data Import/Export" describes the import and expo
First step would be to read the manual on the R site
"R Data Import/Export" describes the import and export
facilities available either in R itself or via
packages which are available from CRAN
Then if that does not solve the problem you need to
explain in detail what the problems are, preferably
Hi everyone, please I'm having problem importing data from Stata and excel.
Help me out.
Thanks
-
[[elided Yahoo spam]]
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://
1 - 100 of 106 matches
Mail list logo