Displaying 20 results from an estimated 1000 matches similar to: "Subscript out of bounds- (my) problem with expansion of expression?"
2005 Jul 14
2
Coxph with factors
Hello,
I am fitting a coxph model with factors. I am running into problems when
using 'survfit'. I am unsure how R is treating the factors when I fit, say:
> DATA<-data.frame(time.sec,done,f.pom=factor(f.pom),po,vo)
> final<-coxph(Surv(time.sec,done)~f.pom*vo+po,data=DATA)
> final.surv<-survfit((final), individual=T,conf.type="log-log")
2013 Mar 14
1
error: object of type 'closure' is not subsettable
Hi all,
when i run this script:
>read.table("Angelika.txt",header=T,sep="\t")
>mytable=read.table("Angelika.txt",header=T,sep="\t")
>for ( dye in c("A","B","C","F","G","K","L","M"))
+ {
+ for (cond in 1:8)
+ {
+ measurement =
2001 Nov 01
1
Erratic behaviour of sammon()
I'm not sure this list is the right place for this thing.
I noticed some erratic behaviour in sammon(). Running sammon on
two nearly identical sets of data results in very different
results. Below is an example. I create an initial configuration
with cmdscale() and store it into 'vec1'. I write this to file,
and read it back in again to 'vec2'. According to cor() on the
three
2010 Feb 02
1
Build a matrix from another matrix by specifying the indexes
Hello R specialists,
I have a base vector called vBase with 102 elements. I have another vector
vec1 which elements are only part of vBase but is shorter. I transform vec1
so I get a vector with the same size as vBase and with each common element
on the same indexed row. If a value is missing in vec1 then I put a Na like
this:
vec1 vBase
Amsterdam Amsterdam
Na
2007 Aug 23
0
indexing and regression testing
Dear all,
It was a pleasure to meet you at Iowa State University. Two days ago I submitted two experimental packages to CRAN (hope it will be there soon):
rindex: quick indexing of large objects (currently only character, see ?index)
regtest: some first support for automated regression testing (heavily used in \dontshow{} section of ?index)
With rindex you can for example
i <-
2015 Oct 22
0
C_LogLin (stats/loglin)
Kai,
Apologies for the double message, it didn't go to the list last time.
On Thu, Oct 22, 2015 at 9:59 AM, Kai Nitschke <
kai.nitschke at uniklinik-freiburg.de> wrote:
>
> ?.Call? calls the C/C++ function ?C_LogLin?. But when I am running it line
> by line I get
> the following error on line 23/24:
> Error: object 'C_LogLin' not found
>
> Hence, my
2015 Oct 22
2
C_LogLin (stats/loglin)
Hi everyone,
I have a question regarding a C function of the "stats" package in R.
I tried to understand the ?loglin? basic function of the ?stats?
package implemented in
R. The implemented function itself runs without any problem (perhaps
see sample). When I
ran it line by line it stopped at the lines 23-24 of the
loglin-function; (the following line):
z <- .Call(C_LogLin,
2006 Feb 13
2
?bug? strange factors produced by chron
Hallo all
Please help me. I am lost and do not know what is the problem. I have
a factor called kvartaly.
> attributes(kvartaly)
$levels
[1] "1Q.04" "2Q.04" "3Q.04" "4Q.04" "1Q.05" "2Q.05" "3Q.05" "4Q.05"
$class
[1] "factor"
> mode(kvartaly)
[1] "numeric"
> str(kvartaly)
Factor w/ 8
2004 May 25
1
cor and missing values. Bug?
There seems to be an issue in computing rank correlations with missing
values present. I think this comes from the way rank() function works but
I am not sure how to go about this. Rank function places missing values at
the end by default thus skewing the rank relationship between two vectors:
Example:
R : Copyright 2003, The R Foundation for Statistical Computing
Version 1.8.1 (2003-11-21),
2009 Jul 27
1
how to use do.call together with cbind and get inside a function
Dear R-helpers:
I have a question related to using do.call to call cbind and get.
#the following works
vec1 <- c(1,2)
vec2 <- c(3,4)
ColNameVec <- c('vec1','vec2')
mat <- do.call("cbind",lapply(ColNameVec,get))
mat
#put code above into a function then it does not work
#before doing so, first remove vec1 and vec2 from global environment
rm(vec1,vec2)
test
2008 Dec 30
2
[LLVMdev] Folding vector instructions
Hello.
Sorry I am not sure this question should go to llvm or mesa3d-dev mailing
list, so I post it to both.
I am writing a llvm backend for a modern graphics processor which has a ISA
very similar to that of Direct 3D.
I am reading the code in Gallium-3D driver in a mesa3d branch, which
converts the shader programs (TGSI tokens) to LLVM IR.
For the shader instruction also found in LLVM IR,
2011 Jun 03
2
Arules: R Crashes when running eclat with tidLists=TRUE
Hello,
I'm using the eclat function of the arules package (1.0-6) for the
identification of frequent itemsets. I need the tidLists, but if I set
in the function tidLists=TRUE R crashes (Windows XP Professional SP3,
32 bit, R version 2.12.1 (2010-12-16), reproducible on two different
computers) with two different error messages or non at all. Minimum
examples are:
library(arules)
2024 Jun 16
1
slowness when I use a list comprehension
This can be vectorized. Try
ix <- seq_along(vec2)
S_diff2 <- sapply(seq_len(N1-(N2-1)*ratio_sampling), \(j)
sum((vec1[(ix-1)*ratio_sampling+j] - vec2[ix])**2))
On Sun, Jun 16, 2024 at 11:27?AM Laurent Rhelp <laurentRHelp at free.fr> wrote:
>
> Dear RHelp-list,
>
> I try to use the package comprehenr to replace a for loop by a list
> comprehension.
>
> I
2009 Jun 04
0
ROracle: cannot insert several columns
Hi all,
I've been playing with ROracle (0.5-9) for a few days
and I can't wrap my mind around this one.
Here's a sample of my R (2.4.0) session.
my.df<-data.frame(prd_id=c(123,456),vol_factor=c(.123,.456))
> my.df
prd_id vol_factor
1 123 0.123
2 456 0.456
> library(ROracle)
Loading required package: DBI
>
2006 Nov 08
0
Fw: data frames re-ordering and naming columns
Thank you for help with the first part. The second part I do not understand. All I get is "3" "3". Presumably this is the factor that you refer to. Is there no simple way of extracting the text alone
----- Forwarded Message ----
From: Peter Alspach <PAlspach@hortresearch.co.nz>
To: Jabez Wilson <jabezwuk@yahoo.co.uk>
Sent: Tuesday, 7 November, 2006 7:46:02 PM
2009 Oct 16
1
Frequencies, proportions & cumulative proportions
Dear R-Helpers,
I've looked high and low for a function that provides frequencies,
proportions and cumulative proportions side-by-side. Below is the table
I need. Is there a function that already does it?
Thanks,
Bob
> # Generate some test scores
> myValues <- c(70:95)
> Score <- ( sample( myValues, size=1000, replace=TRUE) )
> head(Score)
[1] 77 71 81 88 83 93
>
>
2008 May 12
1
lexicographic comparison of two vectors
Is there any built-in way to lexicographically compare two vectors of
the same length in R? The textbook algorithm could be coded as follows:
lex.cmp <- function (vec1,vec2) {
for (j in 1:length(vec1)) {
if (vec1[j] < vec2[j]) { return(-1) }
if (vec1[j] > vec2[j]) { return(1) }
}
return(0)
}
Thanks,
Gabriel
2024 Jun 16
1
slowness when I use a list comprehension
I would be more strong on this advice: learn to think in R, rather than thinking in Python, when programming in R. R has atomic vectors... Python does not (until you import a package that implements them). I find that while it is possible to import R thinking into Python, Python programmers seem to object for stylistic reasons even though such thinking speeds up Python also.
A key step in that
2006 Sep 02
3
Traffic shaper based on UIDs
Hello!
I need assistance to solve my problem related to traffic shaping based on
the user ids.
The problem: each unix user (of the linux host) has to be limited with
incoming channel (internet) bandwidth. I need this to implement
internet access solution based on ltsp (http://www.ltsp.org).
As far as I know the best way to shape traffic in linux is CBQ.
But there is no filter based on unix
2011 Apr 14
1
nesting multiple for loops
Hi everyone.
I am quite frustrated that this doesn't work, as all the functions within
work fine by themselves. I'd also like any pointers to how to avoid 'for'
loops in my code. I understand it's less than desirable, but I'm still quite
new and use them a lot.
I have a few wide datasets (90 to 120) with long column names, each name
contains a number of different