Displaying 20 results from an estimated 21 matches for "matr".
Did you mean:
math
2010 Oct 05
3
Question about assigning values in a matrix, conditional on column first row; how to do the loop.
Hello, I?m new at programming and I will greatly appreciate if you can help me with this.
I have a very large matrix (hundreds of rows and columns), with the first raw filled with different numbers (between 0 and 1). The rest of the matrix is filled with values 0, 1, 2. What I need is to replace the values in the matrix (except the first row will has to remain intact). In each column I have to replace value 2 f...
2009 Mar 13
2
Taking diff of character vectors
...ff(nm1)
to see where I have shift in value
but what if I have
nm2 <- c(rep("SPZ8", 10), rep("SPX9", 10))
how can I produce the same ouput as diff(nm1) does, that is zeros
everywhere except for one place where SPZ8 changes to SPX9 (there
should be 1 there)?
What if I have a matrix of characters like that:
nm3 <- c(rep("GLF9", 4), rep("GLF10", 16))
matr <- cbind(nm2, nm3)
How can I efficiently create two more columns that contain zeros
everywhere except for place where there is shift in character values?
Thanks for help!
Sergey
--
I'm not y...
2012 Feb 29
1
Error occurred during mean calculation of a column of a data frame, which is apparently contents numeric data
Hello R people,
How can I compute the mean of the "Pulse_rate" column of the data frame or
matrix from the following character object called "str_got". It has 14
entries and each entry has 8 values, separated by commas. Please go thru
the following R commands to know how I tried to unstring and unlist the
values to form a data frame.
> str_got
[1] "bp,67,2011-12-09T19:59...
2010 Sep 15
1
Changing variable class problems
...e columns, but the problem is I have a LOT of
different quantitative variables that I would have to do this for.
I've been trying something along the following but it hasn't really been
working
>columns<-c(1,4,6,8,20,22) # where these are the columns that are numeric
workf is the data matrix that I'm working with
So I tried
>workf[,columns]<-as.numeric[,columns]
when I do this I get the error message
Error: (list) object cannot be coerced to type 'double'
I've tried doing it different ways, with a new data matrix Matr and doing
>Matr<-workf
>Matr[,colu...
2012 Jul 12
1
apply() to a function that has more than 2 arguments
Dear all,
I created a function which it has many arguments i.e. Mu(x, Y, B, X, P)
where Mu is the function. This function works perfect but when I am trying
to use it in the apply() function in the manner apply(Matr, 1, Mu, Y=y, B=b,
X=x, P=p) it does not work and the output is: Error in match.fun(FUN) : '1'
is not a function, character or symbol
When I transform the function Mu to have less arguments like Mu(x, DATA) and
use apply by apply(Matr, 1, Mu, DATA=data) it works perfect
Does anyone knows w...
2007 Feb 28
2
delete selecting rows and columns
Hi,
I'm working with a big square matrix (15k x 15k) and I have some trouble.
I want to delete selecting rows and columns.
I'm using something like this:
> sel_r=c(15,34,384,985,4302,6213)
> sel_c=c(3,151,324,3384,7985,14302)
> matrix=matrix[-sel_r,-sel_c]
but it works very slow.
Does anybody know how to make it in faster...
2007 Jul 29
2
Prompt comes too late
Hi R fans
I am trying to make a program to ask the user to choose data file:
print("Choose data file please !")
matr=read.table(file.choose(),dec=".",header=TRUE)
The problem is that the prompt
Choose data file please !
comes after I have chosen the file.
What am doing wrong?
Thanks in advance
Ralf Finne
2009 Jun 26
1
gradient fill of a grid.polygon
...the idea of creating a
colour gradient for a polygon, using the Grid package. The idea is to draw a
number of stripes of different colours, using the grid.clip function. Below
is my current attempt at this,
library(grid)
rotate.polygon <- function(g, angle=0){ # utility function, works fine
matR <- matrix(c(cos(angle), -sin(angle), sin(angle), cos(angle)),
nrow = 2)
gravity.x = unit(mean(g$x),"npc")
gravity.y = unit(mean(g$y),"npc")
x.center = convertX(g$x - gravity.x ,"npc",TRUE)
y.center = convertY(g$y - gravity.y ,"npc",TRUE)
new.xy &...
2011 Apr 27
3
Kolmogorov-Smirnov test
...lower p-value = 0.00304. The lower 'D' indicate that distribution
function (empirical and teoretical) coincide but low p-value indicate that i
can reject hypotezis H0. For another side this p-value is most higer than
p-value from second test (2.2e-16). Which result, test is most propertly?
matr = rbind(c(1,2))
layout(matr)
# length vectorSentence = 11999
vectorSentence <- c(....)
vectorLength <- length(vectorSentence)
# assume that we have a table(vectorSentence)
# 1 2 3 4 5 6 7 8 9
# 512 1878 2400 2572 1875 1206 721 520 315
# Poisson parameter
para...
2001 Dec 21
0
read.table and as.vector (Was error message: "Error in model.frame")
...extension .dmp
for (i in list.files(pattern="*.dmp")){
# read in the file
currentfile <- read.table(i)
# convert 3rd column to a vector:
n <- currentfile$V3
numn<-as.numeric(n)
# compute residuals
residuals <- residuals(lm(numn ~ vecwordlen))
# convert currentfile to matrix format
matcurrentfile <- as.matrix(currentfile)
# convert residuals to matrix format:
matres <- as.matrix(residuals)
# combine the original file with the residuals
bound <- cbind(matcurrentfile,matres)
# append to the output file:
write(t(bound),file="rawresidualsoutput"...
2016 Jan 26
2
Notification of file modification in subdirectories not working
...was made on another PC
Looks like Samba sees change to the file but does not send it as a
notification
[2016/01/26 10:09:15.590689, 10, pid=12027, effective(1001, 1006),
real(1001, 0)] ../source3/smbd/notify_internal.c:615(notify_trigger)
notify_trigger called action=0x3, filter=0x0,
path=/home/matr/localshare/watchfolder/test/subfile.txt
[2016/01/26 10:09:15.590760, 10, pid=12027, effective(1001, 1006),
real(1001, 0)] ../source3/smbd/notify_internal.c:710(notify_trigger_local)
notify_trigger_local called for
/home/matr/localshare/watchfolder/test/subfile.txt, path_len=40, filter=0
[2016/01/...
2016 Jan 22
2
Notification of file modification in subdirectories not working
On Thu, Jan 21, 2016 at 04:57:34AM -0800, ivenhov wrote:
> Hi
>
> Does anyone had similar issues in the past?
> I still cannot find reason why notification of file modification of files in
> subdirs is not visible on client machines
Someone needs to send network traces and debug level 10 logs
for this. And try to reproduce the same against a Windows
server.
Volker
--
SerNet
2011 Jul 01
3
multiple moderated regression steps
...interaction. ?n which block the coefficients are true for entering IV
and moderator co efficients?????
?n 1 block (that include main effects) or in 2 block (that include
interactions)?????
one more question: In three way spreadshhet it is necessary to enter
variance of IV*Moderator coefficient. ?n matr?x which covariance block is
correct to enter this value? should ? look at second covariance block or
third covariance block.
like this,for value of Covariance of IV*Mod1, IV*Mod2 coefficients which
covariance block must be taken as correct???
thaks so much
Note: excuse me for my English
--
View...
2010 Nov 07
1
can't load nlme on windoze 7
...9 -c corStruct.c -
o corStruct.o
gcc -I"C:/pfs/R/R-2.11.1/include"???????? -O3 -Wall? -std=gnu99 -c gnls.c -o gnl
s.o
gcc -I"C:/pfs/R/R-2.11.1/include"???????? -O3 -Wall? -std=gnu99 -c init.c -o ini
t.o
gcc -I"C:/pfs/R/R-2.11.1/include"???????? -O3 -Wall? -std=gnu99 -c matrix.c -o m
atrix.o
gcc -I"C:/pfs/R/R-2.11.1/include"???????? -O3 -Wall? -std=gnu99 -c nlOptimizer.c
?-o nlOptimizer.o
gcc -I"C:/pfs/R/R-2.11.1/include"???????? -O3 -Wall? -std=gnu99 -c nlme.c -o nlm
e.o
gcc -I"C:/pfs/R/R-2.11.1/include"???????? -O3 -Wall? -std=gnu99 -c n...
2007 Feb 27
4
fitting of all possible models
Hi,
Fitting all possible models (GLM) with 10 predictors will result in loads of (2^10 - 1) models. I want to do that in order to get the importance of variables (having an unbalanced variable design) by summing the up the AIC-weights of models including the same variable, for every variable separately. It's time consuming and annoying to define all possible models by hand.
Is there a
2009 Jun 24
0
Matrix vignette error in June 24 RC
I am getting the following problem with make check-all on the June 24
rc. I realize I could probably fix it by installing/setting a path to
the sty file, but I don't remember having to do that for make check-all
in the past.
Paul Gilbert
___________
....
checking package 'Matrix'
* checking for working pdflatex ... OK
* using log directory '/home/paul/toolchain/R/src/R-rc/tests/Matrix.Rcheck'
* using R version 2.9.1 RC (2009-06-22 r48830)
* using session charset: UTF-8
* checking for file 'Matrix/DESCRIPTION' ... OK
* this is package 'Matrix'...
2012 Nov 05
2
[PATCH] x86/ACPI: invalidate BGRT
...#define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
+#define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
+
+/* Reserved table signatures */
+
+#define ACPI_SIG_CSRT "CSRT" /* Core System Resources Table */
+#define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
+#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
+#define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */
+
+/*
+ * All tables must be byte-packed to match the ACPI...
2011 Jul 02
5
How many times occurs
Hi all,
I have a data matrix likein "input.txt"
8 9 2 5 4 5 8 5 6 6
8 9 2 8 9 2 8 9 2 1
8 9 2 5 4 5 8 5 6 4
8 9 2 5 4 5 8 5 6 6
8 9 2 8 9 2 8 9 2 1
8 9 2 5 4 5 8 9 2 2
In this example will be an 6x10 matrix (or data frame)
I want to detect how many times in a row appears this combination 8 follewd
by 9 fol...
2012 Nov 07
0
[PATCH v2] x86/ACPI: invalidate BGRT if necessary
...#define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
+#define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
+
+/* Reserved table signatures */
+
+#define ACPI_SIG_CSRT "CSRT" /* Core System Resources Table */
+#define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
+#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
+#define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */
+
+/*
+ * All tables must be byte-packed to match the ACPI...
2009 Aug 07
0
Bug in nlm, found using sem; failure in several flavors (PR#13882)
...RSET=3DUS-ASCII; FORMAT=3Dflowed
> Content-ID: <Pine.LNX.4.64.0908071039211.2997 at parser.ilovebacon.org>
>
> Hello,
>
> =A0 =A0 =A0 =A0There appears to be a bug in the nlm function, which I dis=
covered
> when trying to run an SEM. =A0The SEM is not bizarre; the covariance matr=
ix is
> solve-able and the eigenvalues are greater than zero, and I do not believ=
e
> the "sem" package per se to be the problem (as nlm keeps being the part t=
hat
> fails, though I can't replicate this with other nlm tasks). =A0I apologiz=
e if
> I have put too many mu...