all( df1 == df3) # it works, but how can I understand that and how it is proven?
Regards
Frank Schwidom
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http:
s interested in it, can take a look:
https://github.com/schwidom/simplefs
Suggestions are welcome.
Kind regards
Frank Schwidom
On 2019-06-12 12:50:12, John via R-help wrote:
> On Wed, 5 Jun 2019 18:07:15 +0200
> Frank Schwidom wrote:
>
> In reading file names, names with spaces require
ot;no tildes in filenames" bandwagon, so this
>behavior, even if technically a bug, has no ability to cause them
>problems.
>Best,
>~G
>On Tue, Jun 11, 2019 at 8:25 AM Frank Schwidom <[1]schwi...@gmx.net>
>wrote:
>
> Hi,
>
> yes,
Hi,
yes, I have seen this package and it has the same tilde expanding problem.
Please excuse me I will cc this answer to r-help and r-devel to keep the
discussion running.
Kind regards,
Frank Schwidom
On 2019-06-11 09:12:36, Gábor Csárdi wrote:
> Just in case, have you seen the fs pack
Hi,
to get rid of any possible filename modification I started a little project to
cover my usecase:
https://github.com/schwidom/simplefs
This is my first R package, suggestions and a review are welcome.
Thanks in advance
Frank Schwidom
On 2019-06-07 09:04:06, Richard O'Keefe wrote:
>
On 2019-06-05 20:32:07, Enrico Schumann wrote:
> >>>>> "FS" == Frank Schwidom writes:
>
> FS> Hi,
> FS> As I can see via path.expand a filename which contains a tilde
> anywhere gets automatically crippled.
>
> FS> +> path
On 2019-06-05 20:32:07, Enrico Schumann wrote:
> >>>>> "FS" == Frank Schwidom writes:
>
> FS> Hi,
> FS> As I can see via path.expand a filename which contains a tilde
> anywhere gets automatically crippled.
>
> FS> +> path
Hi,
As I can see via path.expand a filename which contains a tilde anywhere gets
automatically crippled.
+> path.expand("a ~ b")
[1] "a /home/user b"
+> path.expand("a ~ b ~")
[1] "a /home/user b /home/user"
I want to open a file regardless whether its name contains any character unless
0.
T
correction:
On 2015-10-10 16:08:39, Frank Schwidom wrote:
> On 2015-10-09 20:15:16, liqunhan--- via R-help wrote:
>
> > for (k in 1 : 5) {
> > xlist <- list(x5 = dailyrecord$a[k], x6 = dailyrecord$e[k], x7 =
> > dailyrecord$f[k])
> > result_forlo
On 2015-10-09 20:15:16, liqunhan--- via R-help wrote:
> for (k in 1 : 5) {
> xlist <- list(x5 = dailyrecord$a[k], x6 = dailyrecord$e[k], x7 =
> dailyrecord$f[k])
> result_forloop[k] <- fun3(list1, list2, xlist)
> }
result_forloop <- lapply( 1 : 5, function( k) {
tmpRow <- dailyreco
test1 <- (rbind(c(0.1,0.2),0.3,0.1))
rownames(test1)=c('y1','y2','y3')
colnames(test1) = c('x1','x2');
test2 <- (rbind(c(0.8,0.9,0.5),c(0.5,0.1,0.6)))
rownames(test2) = c('y2','y5')
colnames(test2) = c('x1','x3','x2')
lTest12 <- list( test1, test2)
namesRow <- unique( unlist( lapply( lTest12, ro
And if we want to use the approach of William Dunlap for sequence.optimization
, then we can write:
rev( xr[ seq_len(sum(vec)) - rep.int(cumsum(c(0L, vec[-length(vec)])), vec)] -
rep.int( xr[ -1], vec))
Regards.
On 2015-09-22 23:43:10, Frank Schwidom wrote:
> Hi,
>
> xr <- rev( x
Hi,
xr <- rev( x)
vec <- 1:(length( x) - 1)
rev( xr[ sequence( vec)] - rep.int( xr[ -1], vec))
On 2015-09-21 14:17:40, Dan D wrote:
> I need an efficient way to build a new n x (n-1)/2 vector from an n-vector x
> as:
>
> c(x[-1]-x[1], x[-(1:2)]-x[2], ... , x[-(1:(n-1)] - x[n-1])
>
> x is incre
Hi
I have to correct myself, this last solution is not universally valid
here a better one:
tmp1 <- ( 1 - outer( max( x):1, x, FUN='-'))
tmp1[ tmp1 > 0]
On 2015-09-17 21:06:30, Frank Schwidom wrote:
>
> how abount a more complicated one?
>
> outer( 1:5
better ( if year is an vector of more than 1 element):
df[ df$Year %in% outer(as.numeric( as.character( year)), -1:1, FUN='+'), ]
Year Amount
2 2002120
3 2003175
4 2004160
On Mon, Sep 21, 2015 at 10:49:34PM +0200, Frank Schwidom wrote:
>
> year <- df$Year[ w
year <- df$Year[ which.max( df$Amount)]
df[ df$Year %in% (as.numeric( as.character( year)) + -1:1), ]
Year Amount
2 2002120
3 2003175
4 2004160
On Mon, Sep 21, 2015 at 04:52:46PM +0200, Nico Gutierrez wrote:
> Hi All,
>
> I need to do the following operation from data.frame:
>
>
Hi,
when you can plot this graph using the rgl-package,
then you can use "rgl::writeWebGL" to create an 3D-View
in the Browser.
Regards
On Sat, Sep 19, 2015 at 04:42:47PM +0200, bgnumis bgnum wrote:
> Hi al,
>
> I want to put a graph in a html5 webpage plotted with R (I want to get dar
> from
how abount a more complicated one?
outer( 1:5, 1:5, '-')[ outer( 1:5, 1:5, '>')]
[1] 1 2 3 4 1 2 3 1 2 1
On Thu, Sep 17, 2015 at 11:52:27AM -0700, David Winsemius wrote:
> You can add this to the list of options to be tested, although my bet would
> be placed on `sequence(5:1)`:
>
> > Reduce
sequence( 5:1)
Regards.
On Thu, Sep 17, 2015 at 11:19:05AM -0700, Dan D wrote:
> Can anyone think of a slick way to create an array that looks like c(1:n,
> 1:(n-1), 1:(n-2), ... , 1)?
>
> The following works, but it's inefficient and a little hard to follow:
> n<-5
> junk<-array(1:n,dim=c(n,n)
Hi
where can i find 'melt' and 'dcast' ?
Regards
On Thu, Sep 17, 2015 at 08:22:10AM +, PIKAL Petr wrote:
> Hi
>
> > -Original Message-
> > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Kai Mx
> > Sent: Wednesday, September 16, 2015 10:43 PM
> > To: r-help mailing
Hi
res <- sapply( df1[ , -1], function( x) table(x)[as.character( 0:5)])
rownames( res) <- paste( sep='', 'result', 0:5)
res[ is.na( res)] <- 0
res
item1 item2 item3 item4 item5
result0 1 0 1 1 0
result1 1 2 0 0 0
result2 1 2 1 1
On Mon, Sep 14, 2015 at 04:11:57PM +0100, JORGE COLACO wrote:
> > X-mean
> [,1] [,2] [,3] [,4] [,5] [,6]
> [1,] -0.8 -0.2 0.8 -1.2 0.8 -0.2
> [2,] -0.2 0.2 0.8 0.8 0.8 -1.2
> [3,] -1.2 -0.2 -0.8 0.8 -0.2 0.8
> [4,] 0.8 0.8 -1.2 -0.8 -0.2 -0.2
> [5,] -0.2 -0.2 0.8 0.8 -0.8 0.8
> >
df <- data.frame( V1= 1, V2= c( 2, 3, 2, 1), V3= c( 1, 2, 1, 1))
dfO <- df[ do.call( order, df), ]
dfOD <- duplicated( dfO)
dfODTrigger <- ! c( dfOD[-1], FALSE)
dfOCounts <- diff( c( 0, which( dfODTrigger)))
cbind( dfO[ dfODTrigger, ], dfOCounts)
V1 V2 V3 dfOCounts
4 1 1 1 1
3 1 2
Just for fun:
> colSums( outer( VAS, VAS, '<'))
[1] 3 3 0 3 7 8 8 0 3 0
On Sat, Sep 05, 2015 at 02:14:18PM -0700, Dan D wrote:
> # your data
> VAS<-c("Green","Green","Black","Green","White","Yellow","Yellow","Black","Green","Black")
>
> # declare the new vector
> New_Vector<-numeric(length(V
c( as.factor( VAS))
On Sat, Sep 05, 2015 at 02:14:18PM -0700, Dan D wrote:
> # your data
> VAS<-c("Green","Green","Black","Green","White","Yellow","Yellow","Black","Green","Black")
>
> # declare the new vector
> New_Vector<-numeric(length(VAS))
>
> # brute force:
> New_Vector[VAS=="White"]<-1
>
> rawToChar( charToRaw( str)[ c( TRUE, FALSE)])
[1] "ACEG"
Regards
On Sat, Sep 05, 2015 at 04:59:54PM -0400, Evan Cooch wrote:
> Suppose I had the following string, which has length of integer multiple of
> some value n. So, say n=2, and the example string has a length of (2x4) = 8
> characters
# my last one:
xtfrm( VAS)
On Tue, Sep 08, 2015 at 11:55:51AM -0700, Dan D wrote:
> Great!
>
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Help-with-vectors-tp4711801p4712023.html
> Sent from the R help mailing list archive at Nabble.com.
>
> __
On Sat, Sep 05, 2015 at 02:14:18PM -0700, Dan D wrote:
> # your data
> VAS<-c("Green","Green","Black","Green","White","Yellow","Yellow","Black","Green","Black")
>
> # declare the new vector
> New_Vector<-numeric(length(VAS))
>
> # brute force:
> New_Vector[VAS=="White"]<-1
> New_Vector[VAS=="Yell
Please provide some data from your variable data.
Show the output of dput( data) or an subset
of data which leads toe the specific error.
Regards
On Sun, Mar 30, 2014 at 02:23:09PM +0100, Si Qi L. wrote:
> Hi
>
> I have a problem with linear regression. This is my codes:
>
> acc1<- lm(data$a
Hi,
> c( factor( 'a'), ( 1))
[1] 1 1
> c( factor( 'a'), factor( 1))
[1] 1 1
> c( factor( 'a'), factor( 'b'))
[1] 1 1
> unlist( list( factor( 'a'), 1))
[1] 1 1
> unlist( list( factor( 'a'), factor( 1)))
[1] a 1
Levels: a 1
> unlist( list( factor( 'a'), factor( 'b')))
[1] a b
Levels: a b
In an
another working Example:
{ echo "print( 1)"; cat;} | R --interactive
but do not end with -D, it overrides the
"save workspace" question; use q() instead
there is an additional echo where i don't know
how to avoid them
On Thu, Nov 01, 2012 at 09:14:09AM +0100, Jan van der Laan wrote:
>
> I ha
one way could be:
$ cat rook.R | R --interactive
but with a little different console behaviour
the problem in your other examples is, that
R uses only the first appearing switch of:
--interactive, --f, -e, --vanilla, --no-save, ...
the switches cannot be combined
On Thu, Nov 01, 2012 at 09:14
Hi
some functions, like plot, readline and others behave
different depending to the result of the function interactive()
there is no way to ask R which functions do that
On Thu, Sep 06, 2012 at 01:22:32PM -0500, Michael wrote:
> Help! Weird behavioral difference between R interactive and comman
On Thu, Sep 22, 2011 at 06:46:23PM +, Joseph Boyer wrote:
> Would someone be so kind as to provide example code where they use the
> suggestions argument in the rgba function
> In genalg? I can't get it to work.
>
> The following code works just fine:
>
> GenFit <-rbga(Lower, Upper, evalFun
How can i file this isssue as an bugreport?
On Fri, Feb 03, 2012 at 02:01:02PM +0100, peter dalgaard wrote:
>
> On Feb 2, 2012, at 21:24 , Frank Schwidom wrote:
>
> > Hi,
> >
> > the following Code demonstrates an possibly Error in R
> > (or you can explai
Hi,
the following Code demonstrates an possibly Error in R
(or you can explain me, why this happens, thanks in advance)
Code:
#
testClass <- function( stackData= c())
{
list(
write= function( ...)
{
sChain= ""
for( s in c( stackData, ...))
{
Hi,
you may overwrite existing opreators in the current environment
for example:
> `+` <- `*`
> 2+3
[1] 6
Regards!
On Wed, Mar 30, 2011 at 10:04:19AM -0600, Chuanlong Du wrote:
> Hello, everyone!
>
> Does anyone know how make some symbols have special means in R? For example,
> we know that
37 matches
Mail list logo