编写R程序以完成以下任务: [英] Write a R program to get following tasks done:

查看:115
本文介绍了编写R程序以完成以下任务:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个。从任意字符串中获取单词数和字符数

即新德里 - 有2个单词和9个字符



b.Write函数(n)得到指数值5 ^ n



c。从任何字符串中删除所有数字和特殊字符,即xyz21abc30.com



d.Extract only任意字符串中的数字值,即ab50af:50



e。写一个读取xlsx的函数文件并在当前工作目录中写入该文件的csv格式



f.Print两个日期时间的秒数差异



g。创建一个函数来区分每个字符,无论是字母,数字还是给定列表中的特殊字符

例如。 c(a,1,@):a - 字符,1-数字,@ - spl字符



h。创建一个xlsx工作簿,添加一个名为测试并将其保存在当前工作目录中



i.Write中的命令只删除当前工作目录中的.xlsx文件



j.Write一个函数来计算给定列表中单词的出现,以元音忽略大小写开始。

例如。 c(苹果,猫,苹果,鸡蛋,狗,苹果,鸡蛋)

结果:苹果 - 3,鸡蛋 - 2



k仅使用sqldf包R

例如,找到数据集的均值和方差。 c(1,2,4,5,7,11)的平均值是5,方差是11



我尝试了什么:



这是我的拼贴画,所以请帮忙解决这个问题

a. Get the Number of Words and Number of Characters from any string
i.e., New Delhi – has 2 words and 9 characters

b.Write the function(n) to get the exponential value 5^n

c.Remove all numeric digits and special chars from any string i.e., xyz21abc30.com

d.Extract only Numeric value from any string i.e., ab50af: 50

e.Write a function which read xlsx file and write csv format of that file in current working directory

f.Print difference of seconds from two date times

g.Create a function to distinguish every character whether it is alphabet, number or a special character from a given list
Eg. c(a,1,@) : a – character, 1- number, @- spl character

h.Create a xlsx workbook, add a sheet with name "test" and save it in Current Working Directory

i.Write a command in R to delete only the .xlsx files present in the current working directory

j.Write a function to count the occurrence of words in a given list starting with Vowels ignoring case.
Eg. c(apple, cat, apple, egg, dog, Apple ,Egg)
Result : apple – 3, egg – 2

k.Find Mean and Variance of dataset using only sqldf package of R
Eg. Mean of c(1, 2, 4, 5, 7, 11) is 5 and variance is 11

What I have tried:

this is my collage assigsnment so please help in solving this

推荐答案

对不起,从未去过大学所以我从未学会如何做自己的作业;更不用说别人了。



严肃地说,这是你的功课。它旨在帮助您加强所学知识。要求别人为你做这件事意味着你对这门课程一无所知。所以试着自己做,如果你遇到一些错误;然后请求对特定代码块的帮助。
Sorry, never went to college so I never learned how to do my own assignments; much less someone else's.

In all seriousness, this is your homework. It is intended for you to reinforce what you have learned. Asking others to do this for you means you've learned nothing about the course. So try doing it yourself, and if you get stuck with some error(s); then ask for assistance with that particular block of code.


我们非常愿意帮助那些陷入困境的人:但这并不意味着我们在这里为你做所有事情!我们不能做所有的工作,你要么得到报酬,要么是你的成绩的一部分,我们为你做这一切都不公平。



所以我们需要你做这项工作,当你遇到困难时我们会帮助你。这并不意味着我们会为您提供一步一步的解决方案!

首先解释您目前的位置,以及流程的下一步是什么。然后告诉我们你试图让下一步工作,以及你做了什么时发生了什么。



但是为你做功课可以帮助任何人。
We are more than willing to help those that are stuck: but that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.

But doing your homework for you helps nobody.


引用:

这是我的拼贴画,所以请帮忙解决这个问题

this is my collage assigsnment so please help in solving this



家庭作业的原则是让你通过反复试验来练习和学习。让我们做你的功课只是打败了目的。



我们不做你的家庭作业。

HomeWork不会测试你的技能在请求其他人做你的工作时,它会让你思考并帮助你的老师检查你对所学课程的理解,以及你应用它们时遇到的问题。

你的任何失败都会帮助你的老师发现你的弱点并设定补救措施。

你的任何失败都会帮助你了解什么有效,什么无效,被称为'试错'学习。

所以,试一试,重读课程并开始工作。如果您遇到特定问题,请显示您的代码并解释这个问题,我们可能会提供帮助。



作为程序员,您的工作是创建算法解决特定问题,你不能依赖别人永远为你做,所以有一段时间你必须学会​​如何。而且越快越好。

当你要求解决方案时,就像试图通过培训其他人来学习开车一样。

创建算法基本上是找到数学并做出必要的调整以适应你的实际问题。


The principle of homework is to make you practice and learn by trial and error. Having us to do your homework just defeat the purpose.

We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.
Any failure of you will help you to learn what works and what don't, it is called 'trial and error' learning.
So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.

As programmer, your job is to create algorithms that solve specific problems and you can't rely on someone else to eternally do it for you, so there is a time where you will have to learn how to. And the sooner, the better.
When you just ask for the solution, it is like trying to learn to drive a car by having someone else training.
Creating an algorithm is basically finding the maths and make necessary adaptation to fit your actual problem.


这篇关于编写R程序以完成以下任务:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆