Displaying 20 results from an estimated 20000 matches similar to: "exists function on list objects gives always a FALSE"
2009 Feb 12
3
trunc/floor a number -- strange bahaviour
Hi everybody,
given a fresh rgui.exe load on winxp OS, I enter (a minimal exaple)
n <- 12.357531
Then the following command:
n <- (n - floor(n))*10; n
gives the following outputs:
[1] 3.57531
[1] 5.7531
[1] 7.531
[1] 5.31
[1] 3.1
[1] 1 === still as expected
[1] 10 === not expected, count with me: 1 - floor(1) is zero, times
10 gives 0, not 10!!!!
[1] 10 === should
2008 Jul 10
4
Turn any vector
Dear R-users,
I'd like to turn a vector so it starts with it's end. For better
understanding, this set of commands will do what I need:
i <- seq(1:10)
i_turned <- i
for (j in 1:length(i)) i_turned[j] <- i[length(i)-j+1]
now, i_turned is what I call turned. Is there a function which would make a
script lighter? Thank you upfront for any hint.
Best regards,
Zroutik
2010 Nov 02
2
get the scripname within the executed myscript.r
Dear R-users!
Is there a way to obtain the name of the executed myscript.r, i.e. when
cmd> rscript myscript.r
is executed? (The name of the script in this case is "myscript.r")
Here is the explanation of why I would like to get that: Why: I have
prepared a set of scripts (decompose_data.r, plot_with_higher_resolution.r,
plot_3D.r, etc.) placed in a root directory at one place. I
2008 Aug 11
1
line with of the symbols in the legend -- changable?
Dear R users,
I plot data with
points(my_data[x]~x, col = x, type = "o", lwd="4")
where x is an integer running from 1 to 10, I get points drawn at the plot.
When want to do a legend to this I try
legend(leg.txt[x], col = x, text.col = 1, pch = 1, bty = "n")
where leg.txt contains the names of the variable and x behaves the same. The
difference between the
2008 Aug 11
4
A comprehensive manual on "How to plot" (a lot of graphical examples welcome)
Hi,
I'm looking for a manual (we based or pdf) which would explain in detail
with graphical examples what all the option can do in plot and par. Does
anybody now anything like this? A couple of manuals to R I went through do
have plot parameters mentioned, but sometimes it is hard to understand or
imagine what the parameter can do (the same with the related help page)
e.g. I met "From
2009 Jul 15
1
loading multiple .Rdata and preserving variable names
Dear R-users,
I need to load outputs from multiple previous calculations into one R
session for comparison and (cross-)analysis. The previous calculations are
stored in different directories in .Rdata files (I don't know if this is the
best storage for later usage, but the previous project could be recalculated
and saved into different format, if needed, potentially.)
I can load consequently
2008 Jul 15
0
creating axis of the plot before data are plotted -- solved
Solved. I tried to create a minimal example, but my script is too
complicated to just cut out lines (too many dependencies). Instead of
it, I sketch
my idea. I do not say it is the nicest solution, but it works as I wanted.
The first five rows of my data-matrix:
> data_svd$u[1:5,]
[,1] [,2] [,3] [,4] [,5]
[,6] [,7]
25.12333 -0.05845695
2008 May 23
2
Fit a sine to data
Dear R-users,
I'd like to fit a sine function to my data. The result should have a format
(and thus the formula, too)
y ~ a + sin(x+b)
where y and x are vectors, and a and b are (yet) unknown values.
The data sets (vectors x and y) are OK, and I can do a simple lm fitting
lm(y~x), or lm(y~I(sin(2*pi*x/360))), succesfully My issue is that I'm not
able to do the optional linear shift in
2009 Mar 01
2
smoothing a matrix (interpolate in plane)
Hi R-users,
I'd like to smooth a matrix to dismiss spikes and to interpolate in plane
example of a matrix:
Map[1:3,1:3]
[,1] [,2] [,3]...
[1,] 34.4 34.2 35.1
[2,] 33.4 34.2 35.4
[3,] 34.1 33.2 32.1
....
dim(Map)[1] =/= dim(Map)[2]
What functions can I use?
Thanks a lot for any response, M
[[alternative HTML version deleted]]
2008 Jul 14
1
creating axis of the plot before data are plotted
Dear R-users,
I'm tackling with a problem which causing me a head-ache for a long time. I
would like to create a nice x-axis to my plots, but I do not know how to
implement the method.
Imagine a matrix where you have rownames real numbers -- these rownames
should be written in the x-axis nicely. I could not find any way how.
I'll describe what I'm doing now:
I have a matrix where
2008 Aug 14
1
the name of the current running script.r
Dear R users,
is there a hack how to get the filename of the current script.r sourced/ran?
My issue: I have a couple of scripts which were optimised and are placed in
tens of directories. (I have a height.r script in 30 directories, a lines.r
script in 25 directories and another flow.r script in 54 directories,
growing). The script runs in the directory and does its job: sources data
and creates
2010 Jan 25
1
sequence of equal-length numbers (for filenames)
Dear R-users,
I'd like to create filenames in a mask "file000.dat" numbered from 1 to e.g.
123. The last problem I'm dealing with is creating the sequence of numbers
with equal length, i.e. 001, 002,.... 023, 024,.... 122, 123.
The closest I got is by a repetition:
Sequence <- c(1:123)
for(i in c(1:length(Sequence))) {
print(
paste(rep("0",
2006 Nov 16
1
Sangoma A101 gives 'no PRI configured on span 1' error
I upgraded from Tormenta2 to Sangoma A101. I followed the instructions, and
installation was successful. zttool, ztcfg, all show card is installed
properly. I copied the parameters from my old working zaptel.conf,
zapata.conf and zapata-auto.conf. Verified on Sangoma website that these
files are correct. Also configured wanpipe1.conf.
But doing all this didn't start the PRI channels. It says
2010 Oct 01
2
No translator path exists for channel type DAHDI (native 76) to 256
Hello,
We are having issues with a NEW Sangoma A108D:
-- Executing [691918892 at pbx1:1] Dial("SIP/xtravoip200-009d24b0",
"DAHDI/g0/691918892|30|m") in new stack
[Oct 1 10:04:43] WARNING[14171]: channel.c:3170 ast_request: No translator
path exists for channel type DAHDI (native 76) to 256
[Oct 1 10:04:43] WARNING[14171]: app_dial.c:1237 dial_exec_full: Unable to
create
2005 Jan 27
1
Outgoing call on Zap channel always gives DIALSTATUS ANSWER even when BUSY?
Outgoing call on Zap channel always gives DIALSTATUS ANSWER even when
BUSY? Has anyone run into this?
Here is my conf files:
Zaptel:
span=823,1,0,d4,ami
e&m=1-24
loadzone = us
defaultzone=us
Zapata:
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
2007 Feb 20
1
How to repeat pri show span and zap show channel commands
Hi,
For debugging purpose, it might be useful to repeat every 30s or so, pri
show span and zap show channel commands have the results merged with
/var/log/asterisk/full log file?
Any better idea than running an dedicated shell script with a "asterisk -rx
pri show span 1" line ?
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2007 Feb 13
4
Nortel 81C MSDL Trunking to Asterisk TE110P, Nortel Resetting PRI Channels
We are currently working to trunk from a Nortel 81C to an Asterisk
Server 1.4 running on Red Hat Linux. We have two PRI trunks which work
with the exception of the clock slips, which is causing the Nortel to
reset the PRIs once a hour. Thanks for any suggestions.
81C MSDL Asterisk Digium
TE110P
REQ prt
TYPE adan dch 10
2008 Jan 03
2
HFC-S zap channels always busy
Hi list,
Attempting to get an ISDN-BRI line connected using an HFC-S PCI card
together with Asterisk v1.4.14 and Zaptel 1.4.7 on a Debian etch
system, I find that I can't access the card's resources because the
channels are always be busy. An attempt to call out results in the
following CLI output:
== Primary D-Channel on span 1 down
== Primary D-Channel on span 2 down
2005 Aug 12
3
TDM400P FXO channel hookstate always "Offhook" & outbound digits sent before provider dialtone
I have an Asterisk@Home 1.3 server (Asterisk 1.0.9) and recently added a
TDM400P with (1) FXO card on port 4. Inbound calls are always successful
but outbound calls fail 75% of the time with intercept messages from my
dial tone provider that include "we're sorry, your call did not go
through", and "we're sorry, when placing a local call it is now
necessary to dial an area
2003 Jan 20
1
make check for R-1.6.2 on IBM AIX
Dear all,
The 'make check' step fails for the pacakge mva on IBM AIX.
The tail of the Rout log file looks like:
> for(factors in 2:4) print(update(Harman23.FA, factors = factors))
Call:
factanal(factors = factors, covmat = Harman23.cor)
Uniquenesses:
height arm.span forearm lower.leg weight
0.170 0.107 0.166