Displaying 20 results from an estimated 500 matches similar to: "Problem with icecast"
2017 Jun 04
0
New var
# read.table is NOT part of the data.table package
#library(data.table)
DFM <- read.table( text=
'obs start end
1 2/1/2015 1/1/2017
2 4/11/2010 1/1/2011
3 1/4/2006 5/3/2007
4 10/1/2007 1/1/2008
5 6/1/2011 1/1/2012
6 10/5/2004 12/1/2004
',header = TRUE, stringsAsFactors = FALSE)
# cleaner way to compute D
DFM$start <- as.Date( DFM$start, format="%m/%d/%Y" )
DFM$end
2017 Jun 04
0
New var
Since the number of choices is small (6), how about this?
Starting with Jeff's initial DFM:
DFM <- structure(list(obs = 1:6, start = structure(c(16467, 14710, 13152,
13787, 15126, 12696), class = "Date"), end = structure(c(17167,
14975, 13636, 13879, 15340, 12753), class = "Date"), D = c(700,
265, 484, 92, 214, 57), bin = structure(c(6L, 3L, 5L, 1L, 3L,
1L), .Label
2017 Jun 04
2
New var
Thank you Jeff and All,
Within a given time period (say 700 days, from the start day), I am
expecting measurements taken at each time interval;. In this case "0" means
measurement taken, "1" not taken (stopped or opted out and " -1" don't
consider that time period for that individual. This will be compared with
the actual measurements taken (Observed-
2017 Jan 21
0
bug in rbind?
I'm not sure whether or not this is a bug, but I did isolate the line
where the error is thrown:
src/library/base/R/dataframe.R:1395.
https://github.com/wch/r-source/blob/01374c3c367fa12f555fd354f735a6e16e5bd98e/src/library/base/R/dataframe.R#L1395
The error is thrown because the line attempts to set a subset of the
rownames to NULL, which fails.
R> options(error = recover)
R>
2011 Aug 27
2
Am having trouble calling a function
In my main R program, I have
source("retaanalysis/Functions/doAirport.R")
.... stuff to read data and calculate ads
sapply(ads, function(x) {doAirport(x, base)} )
And doAirport has
# analyze the flights for a given airport
doAirport = function(df, base) {
# Get rid of unused runway factor levels (from other airports)
df$lrw <- drop.levels(df$lrw) # In gdata package
#
2017 Jul 16
0
About doing figures
Hi lily,
As I have no idea of what the "true record" is, I can only guess.
Maybe this will help:
# get some fairly distinct colors
rainbow_colors<-rainbow(9)
# this should sort the numbers in dfm$A
dfm$Acolor<-factor(dfm$A)
plot(dfm$B,dfm$C,pch=ifelse(dfm$DF==1,1,19),
col=rainbow_colors[as.numeric(dfm$Acolor)])
legend("bottom",legend=sort(unique(dfm$A)),
2017 Jan 17
2
bug in rbind?
I suspect there may be a bug in base::rbind.data.frame
Below there is minimal example of the problem:
m <- matrix (1:12, 3)
dfm <- data.frame (c = 1 : 3, m = I (m))
str (dfm)
m.names <- m
rownames (m.names) <- letters [1:3]
dfm.names <- data.frame (c = 1 : 3, m = I (m.names))
str (dfm.names)
rbind (m, m.names)
rbind (m.names, m)
rbind (dfm, dfm.names)
#not working
rbind
2017 Jul 16
0
About doing figures
For more than 10 records, how to reformat the colors? Also, how to show the
first legend only, but at the bottom, while the second legend in your code
is not necessary? In all, the same A values have the same color, but
different symbols in DF==1 and DF==2.
Thanks for your help.
On Sun, Jul 16, 2017 at 9:28 AM, lily li <chocold12 at gmail.com> wrote:
> Hi Jim,
>
> For true color,
2017 Jul 16
2
About doing figures
Hi Jim,
For true color, I meant that the points in the figure do not correspond to
the values from the dataframe. Also, why to use rainbow(9) here? And the
legend is straight in the middle, is it possible to reformat it to the very
bottom? Thanks again.
On Sun, Jul 16, 2017 at 2:50 AM, Jim Lemon <drjimlemon at gmail.com> wrote:
> Hi lily,
> As I have no idea of what the "true
2014 Mar 06
1
Create dataframe in C from table and return to R
Hi ,
I am trying to create a dataframe in C and sebd it back to R. Can anyone
point me to the part of the source code where it is doing , let me explain
the problem I am having .
--------------------------------------------------------------------
My simple implementation is like this
SEXP formDF() {
SEXP dfm ,df , dfint , dfStr,lsnm;
char *ab[3] =
2023 May 09
1
data.frame with a column containing an array
I think the following may provide a clearer explanation:
subs <- c(1,3)
DFA <- data.frame(id = 1:3)
ar <- array(1:12, c(3,2,2))
## yielding
> ar
, , 1
[,1] [,2]
[1,] 1 4
[2,] 2 5
[3,] 3 6
, , 2
[,1] [,2]
[1,] 7 10
[2,] 8 11
[3,] 9 12
## array subscripting gives
> ar[subs,,]
, , 1
[,1] [,2]
[1,] 1 4
[2,] 3 6
, , 2
2023 May 25
1
data.frame with a column containing an array
So is this an expected behavior or is it a bug which should be reported somewhere else?
Thanks!
Georg?
?
?
Gesendet:?Dienstag, 09. Mai 2023 um 19:28 Uhr
Von:?"Bert Gunter" <bgunter.4567 at gmail.com>
An:?"Georg Kindermann" <Georg.Kindermann at gmx.at>
Cc:?"Rui Barradas" <ruipbarradas at sapo.pt>, r-help at r-project.org
Betreff:?Re: [R] data.frame
2011 Jul 20
1
NetApp DataFabric Manager/Sybase/SQLAnywhere on CentOS?
Hello,
Has anyone out there successfully installed NetApp's "DataFabric
Manager" (DFM) on CentOS? If so, what version of DFM, CentOS, and
what architecture?
I am trying to install DFM 4.0.2, and have tried on both CentOS 4.8
i386 and CentOS 5.5 x86_64. I have edited my /etc/redhat-release file
to be equal to RHEL's, as the DFM installer immediately aborts if that
isn't
2023 May 25
3
data.frame with a column containing an array
I really don't know. I would call it a request for extended capabilities of
[.data.frame, rather than a feature or bug. But maybe wiser heads than mine
who monitor this list can sort it out.
-- Bert
On Wed, May 24, 2023 at 8:52?PM Georg Kindermann <Georg.Kindermann at gmx.at>
wrote:
> So is this an expected behavior or is it a bug which should be reported
> somewhere else?
>
2018 May 23
1
legend order in ggplot2
Hi,
I ran your code, but the results were not as expected. After I ran the
code by "source", it return
No id variables; using all as measure variables
> p2
and no line or legend is on the graph (as attached)
Am I doing anything wrong?
John
library(ggplot2)
library(reshape2)
dfm<-melt(df)
dfm$variable<-factor(dfm$variable, levels=levels(dfm$variable)[c(2,1,3,4)])
2017 Jul 16
2
About doing figures
Hi R users,
I still have the problem about plotting. I wanted to put the datasets on
one figure, x-axis represents values B, y-axis represents values C, while
different colors label column A. Each record uses a circle on the figure,
while hollow circles represent DF=1 and solid circles represent DF=2. I put
my code below, but the A labels do not correspond to the true record, so I
don't know
2008 Nov 23
1
Help in Programming using Methods
I WROTE THIS FUNCTION BELOW
test <- function(x, ...) UseMethod('test', x)
test.data.frame = function(x, model, which, error, ...)
{
av <- aov(formula(model), data = x)
res <- test.aovlist(av, which = which, error = error)
return(res)
}
test.aovlist <- function(x, which, error, ...)
{
mm <- model.tables(x, "means")
tabs <- mm$tables[-1]
2017 Jun 03
2
New var
Thank you all for the useful suggestion. I did some of my homework.
library(data.table)
DFM <- read.table(header=TRUE, text='obs start end
1 2/1/2015 1/1/2017
2 4/11/2010 1/1/2011
3 1/4/2006 5/3/2007
4 10/1/2007 1/1/2008
5 6/1/2011 1/1/2012
6 10/5/2004 12/1/2004',stringsAsFactors = FALSE)
DFM
DFM$D =as.numeric(difftime(as.Date(DFM$end,format="%m/%d/%Y"),
2014 Jun 25
1
Need help on calling Head from C
Hi ,
I am trying to call head function from C . My doubt is with the parameter
n,how to pass it .
PROTECT(dfm=lang3(install("data.frame"),df,ScalarLogical(FALSE)));
SET_TAG(CDDR(dfm), install("stringsAsFactors")) ;
SEXP res = PROTECT(eval(dfm,R_GlobalEnv));
PROTECT(head=lang3(install("head"),res,ScalarInteger(1)));
head = PROTECT(eval(head,R_GlobalEnv));
I tried
2023 May 08
1
data.frame with a column containing an array
Dear list members,
when I create a data.frame containing an array I had expected, that I get a similar result, when subsetting it, like having a matrix in a data.frame. But instead I get only the first element and not all values of the remaining dimensions. Differences are already when creating the data.frame, where I can use `I` in case of a matrix but for an array I am only able to insert it in