Displaying 20 results from an estimated 700 matches similar to: "counting strings of identical values in a matrix"
2008 Oct 27
3
counting run lengths
Hello,
I have the following problem.
I am running simulations on possible states of a set of agents
(1=employed, 0=unemployed).
I store these simulated time series in a matrix like the following,
where rows indicates time periods, columns the number of agents (4
agents and 8 periods in this case):
Atr=[
1 1 1 1
1 1 0 1
1 1 0 1
1 1 0 1
0 1 0 1
0
2011 Jan 14
2
selecting elements in vector
Hi everybody,
I have the following problem. I have a vector containing character elements,
such as:
list = c("aa","bb","cc","dd","ee")
I want to create an index which identifies the elements that are different
from, e.g. "aa" and "bb".
When I do the following:
jj = list!="aa" & list!="bb"
> jj
2013 Mar 12
1
loading data frames and rbind them
Hello everybody
I have the following problem. I have to load a number of xls files from
different folders (each xls file has the same number of columns, and
different numbers of rows). Each xls file is named with a number, i.e.
12345.xls and is contained in a folder with same name, say 12345)
Once loaded, I want to rbind all of them to obtain a single database.
I think I successfully did the
2002 Oct 08
2
name_query failed to find name
Hello,
I am hoping someone can help me....
I am trying to configure my samba...and the problem is the following:
When I use nmblookup with -B option and Broadcast address it is
impossible to find my samba server (named prova) that is:
# nmblookup -B 10.254.14.127 prova
querying prova on 10.254.14.127
name_query failed to find name prova
If I do the same lookin up to another machine different
2007 Dec 03
3
overlapping labels
Good evening,
I am trying to add labels to the point of a simple plot, using the
text() function; the problem is that sometimes, if two points are too
close to each other, labels overlap and are no longer readable.
I was wondering whether there are options that I can use to prevent this
overlapping (by, for example, placing labels alternatively above and
below the plotted curve), or whether I
1999 Sep 22
1
dates screwed up, help!
Hi, the problem I am reporting relates to RH Linux 6.0
I have successfully mounted a disk from a windows NT server machine,
using smbmount as follows:
$ smbmount //machine/service -c 'mount /mnt/NTgroups -u local_owner' -U
remote_username
and everything looked fine. Now I have just noticed that when "touching"
or creating files everything behaves strangely, that is the date is
2002 May 10
2
RODBC for importing dbf
Hi
I know that it is very easy to import data from a dbf file to R, by
saving the data as csv, for instance.
However, I have several hundreds of files to do that. So, I thought of
using RODBC to read the dbf files and save it as data.frame. However, I
cannot even start (this is my first time using such package):
> library(RODBC)
> bdades <- odbcConnect("prova.DBF")
Warning
2001 May 31
1
Building shared libraries under Windows
I didn't manage to build a c shared library under Windows.
I used rcmd shlib both with a source file and with an object file, but I got error messages in both cases.
I get the same error messages both using a Dos shell and Cygwin.
If I use the source file, I type:
rcmd shlib prova.c
and what I get is:
make[1]: `libR.a' is up to date.
windres --include-dir
2013 May 29
1
Strange Beauvoir with hard and soft link
How to is possible this?
> [root at lucatest ~]# ls -lid /var/log /var/log/ispconfig /var/log/ispconfig/httpd /var/log/ispconfig/httpd/prova.it /var/log/ispconfig/httpd/prova.it/test /var/www /var/www/clients /var/www/clients/client1 /var/www/clients/client1/web3 /var/www/clients/client1/web3/log /var/www/clients/client1/web3/log/test
> 706 drwxr-xr-x. 15 root root 4096 29 mag 08:44
2005 Apr 07
1
how to print error message in batch mode
Dear list,
I am using R in batch mode:
$ R -q --no-save < prova > output
the input file "prova" has these commands:
data(USArrests)
x<-USArrests
hist(x)
of course, the command hist(x) produces an error. The error message is:
Error in hist.default(x) : `x' must be numeric.
Is there the possibility to save this error massage in the "output" file?
Thanks in
2003 Sep 17
1
the name of a variable in a function
Dear collegues,
How can I get the name of a variable (and not the variable) within a
function ?
For instance, in the following function, I'd like to create a variable
in the dataframe df with the same name to the variable passed in var:
prova <- function( var )
{
df <- as.data.frame(matrix(nr=20,nc=0))
df[["here"]] <- seq(min(var), max(var), le= 20) #
df
}
for
2008 Dec 09
2
problem with Vista
Hello,
I want to import a txt table into R but the software give me this message. I have windows vista.
Errore in file(file, "r") : cannot open this connection
Besides: Warning message:
In file(file, "r") :
cannot open file 'C:/Users/Vincenzo/Desktop/prova/prova.txt': No such file or directory
thank you
**********************************************************
2017 Dec 15
1
Dovecot path separator clarification
Hi Friends,
On Debian Jessie and Dovecot 1:2.2.x using the default separator "/"
(simply leave commented 10-mail.conf -> "#separator =")
I've create for a vuser (from client) a subfolder Scuola/prova
on server side, Dovecot create:
../Maildir/.Scuola.prova
Here my question: why not
../Maildir/Scuola/prova ?
Where I'm wrong?
Many thanks!
Davide
2004 Aug 04
1
load shared object
Hi all,
i have some problem in using shared objects.
I tried the example found in "Writing R Extension", pg. 33
I used the .c file prova.c :
-------------------------------------------------------------------
#include <R.h>
#include <Rinternals.h>
void convolve(double *a, int *na, double *b, int *nb, double *ab)
{
int i, j , nab = *na + *nb - 1;
for (i = 0; i < nab;
2009 Jun 30
5
[Bug 1616] New: root owned empty subdirs are deletable by chroot users
https://bugzilla.mindrot.org/show_bug.cgi?id=1616
Summary: root owned empty subdirs are deletable by chroot users
Product: Portable OpenSSH
Version: 5.2p1
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: sftp-server
AssignedTo: unassigned-bugs at mindrot.org
2011 Feb 11
1
accept_nested_attributes, reject_if doesn't work.
class Post < ActiveRecord::Base
validates :name, :presence => true
validates :title, :presence => true,
:length => { :minimum => 5 }
has_many :comments, :dependent => :destroy
has_many :tags
accepts_nested_attributes_for :tags, :allow_destroy => :true,
:reject_if => proc { |attrs| attrs.all? { |k, v| v.blank? or v.nil? } }
end
rails c
2008 Nov 11
2
Fwd: Permissions in chroot SFTP
Hi,
I configured openssh 5.1p1 for sftp server.
Here the specifications in sshd_config file:
Subsystem sftp internal-sftp
Match Group sftp
ForceCommand internal-sftp
ChrootDirectory /home/%u
AllowTcpForwarding no
When a user is logged in, he can't upload his document and he receives
this message:
carlo at Music:~$ sftp user at 213.217.147.123
Connecting to
2013 Jan 23
3
dovecot 2.1.13, proxy and nologin extras field
Hi at all,
in our test environment, I'm playing with dovecot 2.1.13 configured as
imap/pop/managesieve proxy. It is configured to authenticate users with
ldap and it works very well.
Now, I'd like to temporary disable some users's login, because we are
moving to another storage, and I wouldn't stop imap service at all.
I've found on Dovecot wiki that I could use
2010 Aug 11
1
Subscription to folders and subscription file
Hello,
I'm using dovecot 1.0.7 and have a problem with subscription files.
The documentation says that this file ("subscriptions" or ".subscriptions"
in the root of the maildir, I've tried both) holds the informations about
the subscribed folders.
I've created such a file with these lines:
Trash
Sent
Drafts
INBOX.prova
INBOX.prova4
And configured a client
2005 Dec 08
3
Finding all possible partitions of N units into k classes
Dear useRs!
I would like to generate a list of all possible (unique) partitions of N
units into k classes. For example, all possible partitions of 4 units into 2
classes are (I hope I have not missed anyone):
1,1,1,2 (this can be read as {1,2,3},{4})
1,1,2,1
1,2,1,1
2,1,1,1
1,1,2,2
1,2,1,2
1,2,2,1
The partitions 1,1,2,2 and 2,2,1,1 are the same and are therefore not two
unique