Displaying 20 results from an estimated 10000 matches similar to: "problems with function read.table"
2011 Sep 16
3
question concerning the acf function
Hi everyone,
I've got a question concerning the function acf(.) in R for calculating the
autocorrelation in my data.
I have a table with daily returns of several stocks over time and I would
like to calculate the autocorrelation for all the series (not only for one
time series). How can I do this?
After that I want to apply an autoregressive model based on the estimated
lag in the
2011 Sep 27
4
Question concerning Box.test
Hi everyone,
I've got a question concerning the function Box.test for testing
autocorrelation in my data.
My data consist of (daily) returns of several stocks over time (first
row=time, all other rows=stock returns). I intend to perform a Box-Ljung
test for my returns (for each stock). Since I have about 3000 stocks in my
list, I'm not able to perform the test individually for each
2011 Oct 28
1
Gap in solution
Hi David,
In the general case, there is still a gap in your solution >sum( tbl["1",
2:ncol(tbl)] ). This solution refers to a specific column number (here:
column number 2) and not to the actual length of the run, doesn't it? That
is, in this simple example the column number 2 actually corresponds to the
length "2", but this must not be the case in general. For
2011 Oct 13
1
delete columns which partially match expression
Hello everyone,
I'd like to search for certain "expressions" (characters) in my data.frame
and delete the containing columns.
So, for example in the below table, I'd like to delete all columns which
contain the expression "Error". That is, R should delete column C and E from
my data. Any ideas?
A B C D E
12
2011 Oct 03
1
Sorting data in R according to the header of another table
Hi everyone,
My (simplified) problem is the following one: I have two tables. The first
table contains 5 columns with 5 values and the second table contains a
single value for each vector name of the first table (see tables below):
Table 1:
A B C D E
1 2 3 4 5
2 3 4
2011 Dec 01
1
combining arima and ar function
Hi everyone
I've got a problem regarding the arima() and the ar() function for
autoregressive series. I would simply like to combine them.
To better understand my question, I first show you how I'm using these two
functions individually (see file in the attachement).
1) apply(TSX,2, function(x) ar(na.omit(x),method="mle")$order
# this function finds the optimal
2011 Oct 11
1
filtering rows
Hi everyone,
I've got two data sets as below. My question now is: how can I use Dataset2
as a filter for Dataset1? My goal is just to keep the rows of Dataset1 where
the first column (Date) matches the Dates in Dataset2.
I would appreciate any solutions to this issue.
Many thanks!
S.B.
Dataset1:
Date A B C D
1
2011 Oct 25
1
question regarding intersect function
Hi
I have probably a very simple question but I'm going crazy trying to find
the solution.
I have two data.frames with headers and I'm doing an intersection between
them by names, such that the intersected data.frames are returned by:
df1[intersect(names (df1), names(df2))] and the same for df2
Now, I want to have all the opposite data that did not intersect. I tried to
do:
2011 Oct 27
1
question R regarding consecutive numbers
Hi everyone
Do you know about any possibility in R to check for consecutive numbers in
vectors? That is, I do not only want to count the number of observations in
total (which can be done table(x)), but I also want to count for instance
how many times that vector contains a certain number consecutively.
For example in the following vector x the number "1" appears 7 times.
2011 Sep 28
1
Handling missing values
Hi everyone,
I've got a question concerning missing values in R.
I'm looking for an R code which removes all NA values in my data.frame. I
found many answers about how to remove rows or columns which contain NA's.
My problem however is a bit different. I have a list of vectors. Each vector
contains some NA Values that I want to remove. So, at the end all vectors
will have
2011 Oct 12
1
exclude columns with at least three consecutive zeros
Hi everyone,
I have a large data set with about 3'000 columns and I would like to exclude
all columns which include three or more consecutive zeros (see below
example). A further issue is that it should just jump NA values if any. How
can I do this?
In the below example R should exclude column C and D (since in D jumping the
NA leaves three consecutive zeros).
I would appreciate
2009 Sep 18
1
Reading clipboard with read.delim("clipboard") crash (PR#13957)
Full_Name: Liam Gretton
Version: 2.9.2
OS: openSUSE 11.1 (x86_64)
Submission from: (NULL) (143.210.13.77)
Reading a large number of rows of delimited data via the clipboard results in a
segfault or double free error. I've tested copying from various applications,
but gedit will do.
This problem exists in the openSUSE-supplied 2.8.1, I've just built 2.9.2 to see
if it's still there,
2007 Jan 12
1
R editor vs. Tinn-R
Have you used Tinn-R and what landmines await the inexperienced?
I could not understand why a script that used to work stopped working.
Look at these two scenarios
I opened an excel spreadsheet and copied several cells to the clipboard
Then Scenario 1
Executed from Tinn-R
> prelim<-read.delim("clipboard")
> str(prelim)
'data.frame': 0 obs. of 1 variable:
$
2010 May 24
2
import data from a csv file
Hi all,
I have some trouble reading data from a csv file.
I used command "read.delim("clipboard") to read in the data.
> aalpha.data <- read.delim("clipboard")
> class(aalpha.data)
[1] "data.frame"
> dim(aalpha.data)
[1] 8 25
> colnames(aalpha.data)
[1] "X" "V1" "V2" "V3" "V4"
2006 Aug 26
2
Importing data from clipboard on Mac OSX
Dear R users,
I am trying to get data from the clipboard into R on MacOSX. I tried
the following, but got an error message:
read.delim("clipboard")
Error in file(file, "r") : unable to open connection
In addition: Warning message:
unable to contact X11 display
Obviously, I'm not running R using X11. I'm wondering, can I import
data from the clipboard on MacosX?
2012 Aug 15
4
Import Data from Excel
Dear all,
I want to import just part of an excel data file into R.
I would like to have the data imported without
rownames or colume names.
I used read.delim("clipboard", header=F). Somehow even though
I added the argument "header=F", I still have the row names V1, V2, ...,
Does anyone know how to fix this?
Thanks very much in advance.
Hannah
[[alternative
2012 Dec 19
2
Copy data from Excel
Hello again,
I my day to day calculation, I need to take lot of data from Excel and
forth and generally I use 'clipboard' option with read.delim() function.
However many time, the data in Excel are like '(111,000)' instead of
'-111000'. Generally I convert data in the 2nd form in Excel itself and
then copy to clipboard.
Is there any option in R, so that I can
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
2006 Jan 06
1
"Missing value representation in Excel before extraction to R with RODBC"
Dear list,
How should missing values be expressed in Excel before extraction to R
via RODBC. I'm bewildered. Sometimes the representation with NA in Excel
appears to work and shows up in R as <NA> but sometimes the use of NA in
Excel changes the whole vector to NA's. Blank or nothing or NA as
representation for missing values in Excel with dateformat gives NA's of
the whole
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