Displaying 20 results from an estimated 7000 matches similar to: "warning upon automatic close of connection"
2008 Apr 04
0
Loosing attributes while binding data frames ...
Hello
I want to keep track of my units in the data frame. I have been
advised in the past on this list to create a new "units" attribute of
the data frame and keep the units strings there. It works fine as long
as I don't manipulate the data frame.
Here's an example:
-------------CODE BEGIN -----------------------
df1 <- data.frame(x = 1:10, y = runif(10))
2010 Apr 01
2
time series problem: time points don't match
Hi,
I have a time series problem that I would like some help with if you have
the time. I have many data from many sites that look like this:
Site.1
date time level temp
2009/10/01 00:01:52.0 2.8797 18.401
2009/10/01 00:16:52.0 2.8769 18.382
2009/10/01 00:31:52.0 2.8708 18.309
2009/10/01 00:46:52.0 2.8728 18.285
2009/10/01 01:01:52.0
2013 Feb 15
2
data formatting
Dear Eliza,
Try this:
Lines1<-readLines(textConnection("1911.01.01?????? 7.87
1911.01.02?????? 9.26
1911.01.03?????? 8.06
1911.01.04?????? 8.13
1911.01.05????? 12.90
1911.02.06?????? 5.45
1911.02.07?????? 3.26
1911.03.08?????? 5.70
1911.03.09?????? 9.24
1911.04.10?????? 7.60
1911.05.11????? 14.82
1911.05.12????? 14.10
1911.06.13?????? 7.87
1911.06.14?????? 9.26
2009 Sep 25
2
synchronisation of time series data using interpolation
Readers,
I have data with different time stamps that I wish to plot (for example):
data set 1
time(hh:mm:ss),datum
01:00:00,500
01:00:15,600
01:00:30,750
01:00:45,720
01:01:00,700
01:01:15,725
01:01:30,640
01:01:45,710
data set 2
time,datum
01:00:12,20
01:01:01,55
01:01:55,22
The time interval in data set 1 does not change, but the time interval
in data set 2 does change, such that for a
2010 Jul 06
4
Adding two files into one and vlookup
I have two files with dates and prices in each. The number of rows in each of
them will differ. How do I create a new file which contains data from both
these files? Cbind and merge are not helpful. For cbind because the rows are
not the same replication occurs. Also if I have similar data how do I write
a vlookup kind of function? I am giving an example below:
Say Price1 file contains the
2011 May 31
0
filling in a dataframe with another dataframe
Hello All,
I have two dataframes and I wish to insert the values of one dataframe into
another (let's call them DF1 and DF2). DF1 looks like this:
col1.....col2
a...........1
b...........2
c...........3
d...........4
e...........5
f............6
g...........7
where col1 (which is just the first column of the dataframe) is a list of
characters and col2 is the numeric value associated with
2017 Jul 13
0
about plotting a special case
If you want colors mapped to the _values_ in DF1$C, there are a number
of ways to do it:
Color_unq<-color.scale(DF1$C,c(1,0),c(0,0,c(0,1))
This will produce colors from the lowest values (red) through the
highest (blue). See the help page for color.scale to get different
colors. With this you can use color.legend to add a mapping of the
values and colors.
If you just want different colors,
2011 Aug 18
2
Best way/practice to create a new data frame from two given ones with last column computed from the two data frames?
Dear expeRts,
What is the best approach to create a third data frame from two given ones, when
the new/third data frame has last column computed from the last columns of the two given
data frames?
## Okay, sounds complicated, so here is an example. Assume we have the two data frames:
df1 <- data.frame(Year=rep(2001:2010, each=2), Group=c("Group 1","Group 2"), Value=1:20)
2013 Feb 26
2
merging or joining 2 dataframes: merge, rbind.fill, etc.?
#I want to "merge" or "join" 2 dataframes (df1 & df2) into a 3rd
(mydf). I want the 3rd dataframe to contain 1 row for each row in df1
& df2, and all the columns in both df1 & df2. The solution should
"work" even if the 2 dataframes are identical, and even if the 2
dataframes do not have the same column names. The rbind.fill function
seems to work. For
2006 Jul 01
1
noncentral F-distributed random numbers (PR#9055)
Full_Name: Long Qu
Version: 2.3.1
OS: Windows XP
Submission from: (NULL) (64.113.93.235)
The QQ-plot of two versions of simulating noncentral F-distributed random
numbers has quite different scales:
> qqplot(rf(1000,2,15,3),qf(runif(1000),2,15,3))
The rf() function reads:
> rf
function (n, df1, df2, ncp = 0)
{
if (ncp == 0)
.Internal(rf(n, df1, df2))
else rchisq(n, df1,
2012 Oct 11
1
as.data.frame.matrix() returns an invalid object
Hi,
Two ways to create what should normally be the same data frame:
> df1 <- data.frame(a=character(0), b=character(0))> df1
[1] a b
<0 rows> (or 0-length row.names)
> df2 <- as.data.frame(matrix(character(0), ncol=2,
dimnames=list(NULL, letters[1:2])))
> df2
[1] a b
<0 rows> (or 0-length row.names)
unique() works as expected except that I
2011 Nov 08
2
compare linear regressions
Hi,
I'm trying to compare two linear regressions. I'm using the
following approach:
##################
xx<-1:100
df1 <- data.frame(x = xx, y = xx * 2 + 30 + rnorm(n=length(xx),sd=10), g = 1)
df2 <- data.frame(x = xx, y = xx * 4 + 9 + rnorm(n=length(xx),sd=10), g = 2)
dta <- rbind(df1, df2)
dta$g <- factor(dta$g)
2005 Jan 21
0
R: chi-Squared distribution
Hi,
Attention chi-squared distribution, unlike F
distribution, has only df1 as parameter, not df1 and
df2. So correct into:
outer(1:3, 1:3, function(df1, df2) qchisq(0.95, df1,
df2))
outer(1:3, 1:3, function(df1, df2) qchisq(0.95, df1))
^^^^^^^^^^^^^^^^^^^^
Regards,
Vito
you wrote:
Dear Rs:
outer(1:3, 1:3, function(df1, df2) qf(0.95, df1, df2))
I compare this F
2011 May 16
0
Fwd: Re: rbind with partially overlapping column names
I had meant to copy the list on this; must have hit 'Reply'
instead of 'Reply All'.
P Ehlers
-------- Original Message --------
Subject: Re: [R] rbind with partially overlapping column names
Date: Mon, 16 May 2011 11:14:11 -0600
From: Peter Ehlers <ehlers at ucalgary.ca>
To: Jonathan Flowers <jonathanmflowers at gmail.com>
On 2011-05-16 08:56, Jonathan Flowers wrote:
2004 Feb 19
1
Comparing two regression slopes
I would suggest the method of Sokal and Rholf (1995) S. 498, using the F
test.
Below I repeat the analysis by Spencer Graves:
Spencer:
> df1 <- data.frame(x=1:3, y=1:3+rnorm(3))
> df2 <- data.frame(x=1:3, y=1:3+rnorm(3))
> fit1 <- lm(y~x, df1)
> s1 <- summary(fit1)$coefficients
> fit2 <- lm(y~x, df2)
> s2 <- summary(fit2)$coefficients
> db <-
2010 Apr 23
0
A distance measure between top-k list
Hi folks,
Here is the problem. I am giving an example .I want to find a measure
of similarity or dissimilarity among ranking (of students of a same class
of size say 50)by two judges. But instead of observing the rank of all the
50 students
(Where we could have used rank correlation measures)in each case what I have
is
2 list of top 20 students chosen by each judge.
The following paper gives out
2013 Jun 11
1
Help needed in feature extraction from two input files
Hi,
Try this:
lines1<- readLines(textConnection("gene1 or1|1234 or3|56 or4|793
gene4 or2|347
gene5 or3|23 or7|123456789"))
lines2<-readLines(textConnection(">or1|1234
ATCGGATTCAGG
>or2|347
GAACCTATCGGGGGGGGAATTTATATATTTTA
>or3|56
ATCGGAGATATAACCAATC
>or3|23
AAAATTAACAAGAGAATAGACAAAAAAA
>or4|793
ATCTCTCTCCTCTCTCTCTAAAAA
>or7|123456789
2005 Jun 09
1
Subassignments involving NAs in data frames
I'm seeing some inconsistent behavior when re-assigning values in a data
frame. The first assignment turns all of the 0s in my data frame to 2s,
the second fails to do so.
> df1 <- data.frame(a = c(NA, 0, 3, 4))
> df2 <- data.frame(a = c(NA, 0, 0, 4))
> df1[df1 == 0] <- 2 ## Works
> df2[df2 == 0] <- 2
Error: NAs are not allowed in subscripted assignments
Checking an
2011 Mar 18
1
Problem with Slope.test function
Hi all,
I need to test the significnce of difference between slopes of two regression lines and regression line with theoretical line. I try to use Slope.test function from emu package,
but an error occured...
library(emu)
d1<-data.frame(P1=c(1,2,3,5,7,8,9,13,14,15),
P2=c(1,2,5,8,11,13,15,15,18,24),
R=c(2,7,8,9,16,21,27,31,33,36)) # First data set
m1<-lm(R~P1+P2+P1*P2,data=d1) # Regr.
2007 May 05
1
loop in function
Dear Mailing-List,
I think this is a newbie question. However, i would like to integrate a
loop in the function below. So that the script calculates for each
variable within the dataframe df1 the connecting data in df2. Actually it
takes only the first row. I hope that's clear. My goal is to apply the
function for each data in df1. Many thanks in advance. An example is as
follows:
df1