Displaying 20 results from an estimated 500 matches similar to: "frequency"
2003 Aug 25
1
ODBC access
Hello everybody,
I have tried to connect to external databases (specifically, to a MS Access database in my computer) from R using the RODBC package. Unfortunatelly I haven't been able to do it, even if I 'followed' the instructions in the manual. COuld someone please help me?
I have a MS Access database in my computer and I went to the control panel in order to create a DSN file
2002 Oct 04
3
R 1.6 Gui for Windows
I upgraded to R Gui 1.6 this morning and I can't seem to get it to accept my
new startup directory. R 1.51 will accept
"F:\_ben\bls\gen1\results\bls\analysis" as the start in directory for the R
Gui shortcut, but R 1.6 will not. R 1.6 will accept
"F:\_ben\bls\gen1\results\bls". It seems to have trouble when I add
"\analysis." R still loads fine but I get the
2008 Aug 18
2
matrix row product and cumulative product
I spent a lot of time searching and came up empty handed on the
following query. Is there an equivalent to rowSums that does product or
cumulative product and avoids use of apply or looping? I found a rowProd
in a package but it was a convenience function for apply. As part of a
likelihood calculation called from optim, I?m computing products and
cumulative products of rows of matrices with
2004 Jul 02
1
replace values but different replacement length
Hi,
have anybody a hint/help how it's possible replace i.e.
the NA values from BL02DATE with non-Missing
values from BLOCKED and vice versa.
Both variables are with an id in a 188.249 rows data.frame and
my fr function didn't count the NA's.
Many thanks
Christian
>>fr(BL02DATE)
Count Prcnt
1 140660 84.6
2 25589 15.4
Total 166249 100.0
2005 Jul 07
3
xmat[1, 2:3] <- NULL
I have a situation where I'm filling out a dataframe
from a database. Sometimes the database query doesn't
get anything, so I end up trying to place NULL in the
dataframe like below.
> temp <- NULL
> xmat <- as.data.frame(matrix(NA, 2, 3))
> xmat[1, 2:3] <- temp
Error in if (m < n * p && (n * p)%%m)
stop(gettextf("replacement has %d items, need %d",
2004 Sep 16
1
Newbie q. need some help understanding this code.
dear all.
Would someone be kind and willing to explain the code
below for a person who has never used R? ( that is if
one has enough time and inclination)
It implements gillepsie's stochastic algorithm for
Lotka Volterra model.
What would help me tremendously is to see the
breakdown of the line by line code into plain english.
thanks for any insights or other comments.
sean
2002 Sep 03
1
t(xmat)
Hi,
I have a matrix and time series "xmat". I have no problem executing any matrix functions except t(xmat) which gives the following error message. My question if "xmat" is a matrix why I can not execute this matrix function?? converting the time series and matrix into a data frame solves the problem
>dim(xmat)
[1] 98 7
> t(xmat)
Error in "tsp<-"(*tmp*,
2009 Mar 05
3
methods package
I'm working on the next version of coxme, one step of which is converting
the bdsmatrix library from Splus to R. Actually, it is a conversion from
S4 methods as first described in the Green book to S4 methods as they
currently exist. Mostly it's going ok, but not entirely.
1. The biggest issue is lack of documentation. The online help pages have
not been a help; they keep saying
2004 Sep 28
3
sapply behavior
Hi,
I use sapply very frequently, but I have recently noticed a behavior of
sapply which I don't understand and have never seen before. Basically,
sapply returns what looks like a matrix, says it a matrix, and appears to
let me do matrix things (like transpose). But it is also a list and behaves
like a list when I subset it, not a vector (so I can't sort a row for
instance). I
2007 Apr 13
3
apply problem
Dear R-Help
I am running apply on a data.frame containing factors and numeric
columns. It appears to convert are columns into as.character? Does it
convert data.frame into matrix? Is this expected? I wish it to recognise
numerical columns and round numbers. Can I use another function instead
of apply, or should I use a for loop in the case?
> summary(xmat)
A B
2009 Jun 14
2
Permissions of new files on samba with other read on.
Daniele Palumbo <daniele@retaggio.net> wrote:
>hi.
>
>I have troubles of global readable bit on new file created on samba.
>I wish to have a 660 permission on new files, instead i've got 664.
>
>also, if i create an empty files it will get 644 permmission, instead of 660.
>
>directory creation instead seems fine.
>
>Below my environmnent and tests.
2005 Jul 22
1
find confounder in covariates
Hi,
I was wondering if there is a way, or function in R to
find confounders. For istance,
> a = sample( c(1:3), size=10,replace=T)
> X1 = factor( c('A','B','C')[a] )
> X2 = factor( c('Aa','Bb','Cc')[a] )
> Xmat = data.frame(X1,X2,rnorm(10),rnorm(10))
> dimnames(Xmat)[[2]] = c('z1','z2','z3','y')
Now,
2012 Oct 27
2
Class generator functions for reference classes
As of rev. 61035 in r-devel, setRefClass() now returns a generator
function, as setClass() has done since 2.15.0.
The convenient style is now:
mEdit <- setRefClass("mEdit",......)
xx <- mEdit(data = xMat)
instead of
xx <- mEdit$new(data = xMat)
The returned object still has fields and methods accessible as before.
See the "Value" and "Reference Class
2004 Mar 03
1
match.call(), S4
I get different results from match.call(), according to whether a function
is dispatched via S3 or S4. Specifically, when I use S4 dispatch in the
following example, the match.call() result is of length 1 less than I
expect. I need to add an extra comma to get the same results as in the S3
method.
--------example
setClass("foo",representation("matrix"))
2020 Oct 27
3
R for-loop to add layer to lattice plot
Hello,
I am using e1071 to run support vector machine. I would like to plot
the data with lattice and specifically show the hyperplanes created by
the system.
I can store the hyperplane as a contour in an object, and I can plot
one object at a time. Since there will be thousands of elements to
plot, I can't manually add them one by one to the plot, so I tried to
loop into them, but only the
2007 Mar 22
2
Colored boxes with values in the box
Hi all,
I have a x, y matrix of numbers (usually ranging from 0 to 40). I need
to group these numbers and assign a color to each group (for example 0
to 15 - Blue, 16-30- Yellow, and 31-40- Red). Then I need to draw a
rectangular matrix which contains X x Y boxes and each box has the
corresponding value from the input matrix and is also colored according
to which group (i.e red, yellow,
2005 May 20
1
using src/Makevars file
Hi all,
Thanks to all who offered advice on using F95 in R.
Now I'm trying to compile a test package using gfortran, Linux 2.4.21 and
R 2.1.0.
I was able to successfully compile and use a test F95 routine by setting my
environment variables as follows in bash:
export PATH=~/bin/:$PATH
export F77=gfortran
export LD_LIBRARY_PATH=~/bin/irun/lib
export GFORTRAN_STDIN_UNIT=-1
Now I'm
2009 Apr 04
1
Problem with sample()
Hi,
I'm having a problem using sample() within a function.
Basically I get an error reading:
Error in sample(v, 1, prob = h) : non-positive probability
Can anyone advise me as to the possible origin of this error?
Here is my code
#Discretised Gillespie algorithm function (From SMfSB, D.J. Wilkinson)
gillespied=function (N, T=100, dt=1, ...)
{
tt=0
n=T%/%dt
x=N$M
2013 Jan 03
5
splitting matrices
Dear useRs,
i want to split a matrix having 1116rows and 12 columns. i want to split that matrix into 36 small matrices each having 12 columns and 31 rows. The big matrix should be splitted row wise. which means that the first small matrix should copy values which are in first 31 rows and 12 columns of the big matrix. similarly 2nd small matrix should contain values from 32nd to 63rd row of the
2017 Jun 23
0
Samba AD - Issue with winbindd: Could not write result
Please see inline comments.
On Fri, 23 Jun 2017 07:09:47 +0200
Marco Coli <marco.coli at isolettaelba.eu> wrote:
> cat /etc/resolv.conf
> # Generated by NetworkManager
> search niccolai.local
> nameserver 10.0.0.253
Only thing wrong there is that you may be using the '.local' domain
(unless it is has been changed to hide the real domain). If it is the
real domain,