similar to: Interacting with the Operating System

Displaying 20 results from an estimated 10000 matches similar to: "Interacting with the Operating System"

2013 Apr 16
6
I don't understand the 'order' function
I thought I've understood the 'order' function, using simple examples like: order(c(5,4,-2)) [1] 3 2 1 However, I arrived to the following example: order(c(2465, 2255, 2085, 1545, 1335, 1210, 920, 210, 210, 505, 1045)) [1] 8 9 10 7 11 6 5 4 3 2 1 and I was completely perplexed! Shouldn't the output vector be 11 10 9 8 7 6 4 1 2 3 5 ? Do I have a damaged
2012 Apr 05
4
A kind of set operation in R
I have an ordered "set" of numbers, represented by a vector, say > X <- c(10:13, 17,18) > X [1] 10 11 12 13 17 18 then I have a "sub-set" of X, say > Y <- c(11,12,17,18) Is there a simple way in R to have a logical vector (parallel to X) indicating what elements of X are in Y, i.e., > Inclusion [1] FALSE TRUE TRUE FALSE TRUE TRUE I'm
2013 Dec 06
2
Using assign with mapply
I have a data frame whose first colum contains the names of the variables and whose second colum contains the values to assign to them: : kkk <- data.frame(vars=c("var1", "var2", "var3"), vals=c(10, 20, 30), stringsAsFactors=F) If I do : assign(kkk$vars[1], kkk$vals[1]) it works : var1 [1] 10 However, if I try with mapply
2012 Mar 30
4
Trying to understand factors
I'm trying to figure out about factors, however the on-line documentation is rather sparse. I guess, factors are intended for grouping arrays members into categories, which R names "Levels". And so we have: * state <- c("tas", "sa", "qld", "nsw", "nsw", "nt", "wa", "wa",
2012 Sep 12
4
Trying to use pipes in R
Hi, I'm trying to use pipes in R. By now, I could launch the linux command "wc" (to count words from a text), but I don't know how to capture the results, say in a vector of chars... Here is the R code I'm trying: :> f <- pipe("wc", open="w") :> writeLines(c("uno dos tres", "cuatro cinco", "seis"), f) :> close(f)
2012 Mar 10
2
Reading text files from other languages
I'm trying to read a data file that contains characters from the Spanish language: > Station <- read.fwf("LosDatos.txt",widths=c(7,7,25,8,8,5),header=FALSE, + skip=3,n=separ[1]-4) Then the R interpreter issues the following message: Error en substring(x, first, last) : invalid multibyte string at '<d1>A, S.' Calls: read.fwf ->
2013 Feb 08
2
Coercing of types when raising a number to a series of powers
I'm trying to produce a series of powers of a number as follows: |> 0.05^0:5 [1] 1 2 3 4 5 This is not the result I expected. I guess some kind of coercion happened, since, |> class(0.05^0:5) [1] "integer" Could anyone explain me what is happening here? Thanks, -Sergio.
2012 Aug 20
5
Some kind of inverse of "names"
I wonder if there exists some kind of inverse of the "names" primitive in R. Let me explain what do I mean: If I create a list: -> li <- list(a=1, b=2, c=3, d=4) then I can have: -> names(li) [1] "a" "b" "c" "d" which is, I guess, some kind of vector, since -> typeof(names(li)) [1] "character" however, I haven't
2012 Mar 29
4
Handling functions as objects
I learnt that functions can be handled as objects, the same way the variables are. So, the following is perfectly valid: > f = function(a, b) { + print(a) + print(b) + } > > f1 = function(foo) { + foo(1,2) + } > > f1(f) [1] 1 [1] 2 > I also know that operators are functions, so, I can call: > '+'(1,2) [1] 3 > However, when I want to pass the
2012 Apr 01
2
A function like sum but with functions other than '+'
Because I didn't find in R any functions similar to the function 'reduce' from Python, I'm writing a function "freduce" as follows: freduce <- function(f, vec, ValIni=NULL, StopIn=NULL) { # f: is any function that takes two arguments of the same type # vec: is a vector of n values accepted by 'f' # # Initially f starts with ValIni, if it's given
2012 Jun 13
1
Reading several tables from stdin
I'm trying to write a Rscript program capable of reading several tables from the standard input. The problem is that the tables aren't in files because they are coming from another process that is generating them. From the R-console the following works pretty well: |> f <- stdin() |> t <- read.table(f) |> t2 <- read.table(f) |> t uno dos 01 3 4
2011 Nov 17
3
Named rows in a table (data frame) read from a file
I read a table as follows: > F1 <- read.table("Rtext3.txt") > F1 Price Floor Area Rooms Age Cent.heat a 52.00 111 830 5 6.2 no b 54.75 128 710 5 7.5 no c 57.50 101 1000 5 4.2 no d 57.50 131 690 6 8.8 no e 59.75 93 900 5 1.9 yes As it is seen, the rows have a name. However I don't know how to access a
2011 Nov 08
4
Intervals in function cut
When I was studying the function cut I found this example: > x <- rep(0:8, tx0) > x [1] 0 0 0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 4 4 4 5 5 5 5 5 5 5 5 5 5 6 [39] 6 6 6 6 7 7 7 8 8 8 8 8 > cut(x, b = 8) [1] (-0.008,0.994] (-0.008,0.994] (-0.008,0.994] (-0.008,0.994] (-0.008,0.994] [6] (-0.008,0.994] (-0.008,0.994] (-0.008,0.994] (-0.008,0.994] (0.994,2] [11] (0.994,2]
2011 Nov 10
5
Named components in a list
I'm studying lists and I came to an example where > L $name [1] "Fred" $wife [1] "Mary" $no.children [1] 4 $child.ages [1] 4 7 9 then following the instructions to extend the list with a new component, I executed: > L[5] <-list(NewName="something") and the new list I got was: > L $name [1] "Fred" $wife [1] "Mary"
2002 Mar 05
1
ext3 crashing
Hi folks, I'm using rh72 kernel-2.4.7-10smp. I have a webmail application (sqwebmail + qmail) running together but .. I've got my server crashed since it geting thousands of messages ... the part of error message is: ---xxx-- Assertion Failure in do_get_write_access() at transaction.c:606 .... ....etc ..etc ... --xxx-- how can I fix that ? thx in advance .. Sergio Pereira
2013 Apr 12
1
A strange behaviour in the graphical function "curve"
I thought the curve function was a very flexible way to draw functions. So I could plot funtions like the following: # I created a function to produce functions, for instance: fp <- function(m,b) function(x) sin(x) + m*x + b # So I can produce a function like this ff <- fp(-0.08, 0.2) ff(1.5) # Is the same as executing sin(1.5) - 0.08*1.5 + 0.2 # Let's plot this
2004 Jul 22
8
debian install zaptel
Hi: Did anyone use apt-get install zaptel successfully? After apt-get instal zaptel, use "modprobe zaptel", get a "FATAL modul zaptel not found". Thanks. Yan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040722/4608e1e5/attachment.htm
2005 Jul 27
2
oh323 geting voice problem g729 xeon 2.8 , fedora 1 , asterisk 1.0.6
Abwesenheitsnotiz: [Asterisk-Users] oh323 geting voice problem g729 xeon 2.8 , fedora 1 , asterisk 1.0.6Hi All I am using oh323 with 6.6 virsion , and runing under xeon 2.8 dual with 2 gb ram, with g729 for i686 , (fedora 1). my problem is sip - oh323 - h323 (quintum) - pstn , sip party can listen otherparty realtime voice , but other party geting sip party's voice 1 sec later (not
2013 Jul 12
1
Conexion excel vba con R y VBasic con R
Muchas gracias, Sergio. Saludos cordiales. Eduardo Freyre -----Mensaje original----- De: miguel.angel.rodriguez.muinos en sergas.es [mailto:miguel.angel.rodriguez.muinos en sergas.es] Enviado el: viernes, 12 de julio de 2013 12:39 Para: efreyre en movistar.es; r-help-es en r-project.org Asunto: RE: [R-es] Conexion excel vba con R y VBasic con R Hola Eduardo. Lo que buscas lo puedes
2004 Sep 30
2
Win2003 ADS member server - almost working, ideas?
I am attempting to install a Samba-3.0.0,1 on FreeBSD 5.2.1-RELEASE server to an existing Windows 2003 Server Active Directory Domain. I've followed Chapter 6 of the HOWTO man to get as far as I have. #kinit gooduser --successfully gets a kerberos ticket #wbinfo --authenticate=gooduser%goodpassword -- successfully authenticates all user accounts (that I've tested) #wbinfo -u yields