similar to: How can a function in R handle different types of input?

Displaying 20 results from an estimated 4000 matches similar to: "How can a function in R handle different types of input?"

2012 Mar 22
3
How to get the input of a function right?
Hi, I wrote a function with three inputs fun(x,y,z). x is a matrix of three vectors combined with cbind. e.g. x1<-(1,2,3,4) x2<-(2,3,4,5) x3<-(3,4,5,6) x<-cbind(x1,x2,x3) y is a vector e.g y<-c(7,8,9) z is a real number e.g. z<-2.5 If a give the function an input like this, I get 'NA' in return. If I give the function a vector e.g c(1,2,3) instead of 'x'
2012 Mar 12
1
Get a subset
Hi, I have a list of names (alphanumeric characters) and each row by itself contains a different number of names seperated by a semicolon (";"). There are also rows with no entry. I would like to have the name before the first semicolon in each row, if there is any entry. Does anyone have an idea how to solve this in R? Thank you! Stella -- View this message in context:
2012 Aug 05
1
Problem with segmented function
Hi, I appreciate your help with the segmented function. I am relatively new to R. I followed the introduction of the 'segmented'-package by Vito Muggeo, but still it does not work. Here are the lines I wrote: data_test<-data.frame(x=c(1:10),y=c(1,1,1,1,1,2,3,4,5,6)) lr_test<-lm(y~x,data_test) seg_test<-segmented(lr_test,seg.Z~x,psi=1) /error in segmented.lm(lr_test, seg.Z ~ x,
2009 Aug 12
3
Random sampling while keeping distribution of nearest neighbor distances constant.
Dear All, I cannot find a solution to the following problem although I imagine that it is a classic, hence my email. I have a vector V of X values comprised between 1 and N. I would like to get random samples of X values also comprised between 1 and N, but the important point is: * I would like to keep the same distribution of distances between the X values * For example let's say N=10 and
2006 Sep 25
1
nlme with a factor in R 2.4.0beta
Hi, the following R lines work fine in R 2.4.0 alpha (and older R versions), but not in R 2.4.0 beta (details below): library(drc) # to load the dataset 'PestSci' library(nlme) ## Starting values sv <- c(0.328919, 1.956121, 0.097547, 1.642436, 0.208924) ## No error m1 <- nlme(SLOPE ~ c + (d-c)/(1+exp(b*(log(DOSE)-log(e)))), fixed =
2018 Nov 14
2
Building LLVM with VisualStudio 2017
Hey Bjorn, Were you able to figure this out or is it still broken for you? Our scenario is a little bit different, but I have a theory as to what may be going wrong. What linker are you using when you compile your project with clang-cl? I am wondering whether the version of the linker and/or the libraries that you are using is too old in comparison to the one used for the clang compilation.
2008 Dec 01
1
Attempting to get a STELLA model into R
To whomever may be of help, I am a student in a graduate modeling class at the University of North Carolina at Wilmington. I am trying to get a STELLA model converted into R. I am in the process of trying to 're-write' the script into R, but I seem to be missing pieces (i.e. parm values) that are keeping me from being able to replicate this model into R. Does anyone have an idea of a
2010 Jun 01
2
Help on aggregate method
Dear R experts, I would really appreciate if you had an idea on how to use more efficiently the aggregate method: More specifically, I would like to calculate the mean of certain values on a data frame,? grouped by various attributes, and then create a new column in the data frame that will have the corresponding mean for every row. I attach part of my code: matchMean <-
2000 Feb 03
1
Passwords issues with samba 2.0.6
In my pursuit of integrating samba password authentication with our own stuff, I've been looking at ways on synchronizing the two. And here are the two problems for which I hope to get either solution: a) smbpasswd will not pass down spaces to whatever is called for synchronization. Barely looking at the synchronization routine, it scans as a string, which would skip anything after a space.
2010 Apr 19
2
Huge data sets and RAM problems
Dear all, This is the first time I am sending mail to the mailing list, so I hope I do not make a mistake... The last months I have been working on my MSc thesis project on performing data mining techniques on user logs of a software-as-a-service application. The main problem I am experiencing is how to process the huge amount of data. More specifically: I am using R 2.10.1 in a laptop with
2011 Feb 09
3
Loop in variable names
Hello! I would like to do some tables for several variables and I would like to write a loop that does the table for each variable. I should also point out that my data set has several missing observations and sometimes the observations that are missing are not the same for all my variables. What I would like to do: table(StoreData$CompanyID, !is.na(StoreData$P2))
2003 Sep 15
2
Aliases for Netbios name
Hi ! Is There how I use an alias for a Samba Server ? I tried with dns alias and don't work ! i.e. Name' Samba Server is PARATY, and I'd like that the workstations could communicate with this Samba Server, but using the name SambaPDC. Is it possible ? Thanks, Bruno Stella brunostella@trt15.gov.br Setor de Redes - Secretaria de Informatica Tribunal Regional do
2005 Apr 11
2
Linux Users execute 'login scripts'
Hello ! I have a Samba Server with LDAP(OpenLDAP) authentication and Windows Workstation that login in domain working all right. Now, I need to configure Linux workstations to log in Samba Server Domain. The Linux workstatios users are all in LDAP. How do I configure to execute the 'login script' when a Linux user log in his linux workstation ? Thanks for any help ! Bruno Stella
2012 Jan 29
1
A desktop Centos remix
Hello Centos users! I'm doing a Centos 6 desktop oriented remix called Stella. This has been brewing since the summer and it's starting to get ready. :-) I've backported a lot of packages from Fedora and Rpmfusion and I bundle several other repos, too, resulting in a big range of software available, including but not limited to: LibreOffice, VLC, MPlayer, Shutter, Arista, Java,
2005 May 11
1
rank (PR#7850)
Full_Name: Stella David Version: 2.1.0 OS: mingw32 Submission from: (NULL) (137.250.161.136) It seems that rank doesn't work right on vectors containing negative values. If the negative value is the first component or there are only two components, it works, but if the negative value is somewhere in the middle there's a problem. Here are my examples: > # wrong: > x<-
2019 Sep 20
2
build bot mails
At Arm we are not receiving any build bot mails from llvm.buildmaster at lab.llvm.org. Our IT is a bit in the dark what's going on here (they don't see anything in logs, no failures, no connections), their hunch is that is a "DNS (MX record) issue on llvm.org's end". I don't know who to contact or how to progress this. Anyone perhaps an idea? Cheers, Sjoerd.
2010 Jan 03
1
Questions regarding sem using hetcor() function from polycor and diagrams
Hello R Users, While I have attempted to dig into the R help files and I have not identified the answer to these questions, I apologize in advance if my questions were answered in the past. I also recognize that one of my questions unfortunately verges on statistical rather than code territory. I have two rather unrelated questions about using the sem and polycor packages for a relatively
2020 Jun 23
8
[Incubation] Request to incubate mlir-npcomp
Per the recent (seeming) consensus regarding incubating new projects under the LLVM organization, I would like to trial the process by requesting to incubate mlir-npcomp <https://github.com/google/mlir-npcomp>. The project is still quite young and has been primarily developed part time by myself and Sean Silva over the last ~2 months. We set it up following discussion of a Numpy/Scipy op set
2020 Jun 30
4
LLVM Incubator + new projects draft
The idea of adding an “incubation” stage to projects in the LLVM world seems to be positively received. I also noticed that we don’t really document the new project policy in general in the LLVM Developer Policy. To help with both of these Stella and I worked together to draft up a new section for the LLVM developer policy (incorporating the existing “New Targets” section). Ahead of proposing a
2000 Mar 02
1
smbpasswd error message
Hi, I have successfully installed Samba on a Solaris2.7 system and created the smbpasswd file using mksmbpasswd.sh Now I want to set passwords for all users. But when I try to run "smbpasswd" or "smbpasswd username" as root the following error message occurs: -------------- make_smb_from_nisp: NIS+ lookup failure: Error in accessing NIS+ cold start file... is NIS+ installed?