similar to: Some kind of inverse of "names"

Displaying 20 results from an estimated 9000 matches similar to: "Some kind of inverse of "names""

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)
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 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 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 Mar 09
3
Interacting with the Operating System
Is there any way to issue operating system commands and geting back the results, in R? I mean, for instance, in Linux, to execute from R the 'ls' command and getting back a list of files in the current directory, or, equivalently, in Windows/DOS, the 'dir' command? I'm not interested in the 'ls' or 'dir' commands it is just an example. Do you have any
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 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 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.
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
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
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
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
2013 Jul 12
2
Conexion excel vba con R y VBasic con R
Buenos días: ¿Hay alguna forma de conectar VBA de Excel con R, de forma que desde Excel se puedan cursar instrucciones de R?, ¿ y V.Basic con R? Gracias anticipadas. Saludos [[alternative HTML version deleted]]
2010 Mar 25
1
R CMD install: problem quoting spaces when calling gzip?
There appears to be a quoting problem in the way R CMD install handles file names containing spaces, more specifically, in the way the argument is passed through to gzip. The install.packages command (from R) install.packages("~/Projects/R library/bar/eyetrackR_0.13.tar.gz", repos = NULL, type = "source") expands to
2005 Jul 14
1
Re: <asunto_mensaje_entrante>
Hasta el día 31 de Julio permaneceré de vacaciones, por lo que cualquier tipo de consulta, técnica o comercial debe redirigirla a soporte@avanzada7.com o a marketing@avanzada7.com
2013 Apr 03
1
ploting several functions on the same plot
I want to superimpose two functions plots in the same page. The functions L0 and L1, defined below f0 <- function(mu, xm, ds, n) { 1 - pnorm((xm-mu)/(ds/sqrt(n))) } f1 <- function(mu,n) f0(mu, 386.8, 48, n) L0 <- function(mu) f1(mu, 36) plot(L0,ylim=c(0,1),xlim=c(360,420)) L1 <- function(mu) f1(mu,100) lines(L1) The plot of L0 works pretty well. However, when
2015 Feb 02
3
A good way to debug a c++ library embedded to R code
Dear all, I am using R CMD SHLIB to compile a c++ code into a library (.so) and dyn.load to load this library into a R code. I am facing some problems in the c++ code that I can not figure out how to solve. Do you recomend any good way to debug this R + C++ program? If I was programming only in C++ I would use GDB. I would much appreciate any help or suggestion! Best regards, Charles -- Um
2013 Apr 04
1
Plotting several functions in the same display (again)
To superimpose two functions plots in the same page. The functions L0 and L1, as defined below, I use the following code: # An accumulative normal distribution function with # several parametres f0 <- function(mu, xm, ds, n) { 1 - pnorm((xm-mu)/(ds/sqrt(n))) } f1 <- function(mu,n) f0(mu, 386.8, 48, n) # Two functions with just the parameter mu L0 <- function(mu)
2012 Aug 20
0
Problem with initializiing R main loop under Windows (R.dll-version: 2.15.1)
Dear R-developers, even though I may not be the first one to encounter the problem described below, I would really appreciate some help or a link to a forum where this topic is being discussed. Probably I am simply misinformed on the usage of structRstart but see for youselve. I did check multiple forums and the whole internet on the topic without success. I am using the shared library version